Avalanche docs initial commit

James Peret 10 years ago
commit
389ae395c5
51 changed files with 2524 additions and 0 deletions
  1. 3 0
      .bowerrc
  2. 21 0
      .editorconfig
  3. 1 0
      .gitattributes
  4. 6 0
      .gitignore
  5. 16 0
      .jshintrc
  6. 9 0
      .travis.yml
  7. 1 0
      .yo-rc.json
  8. 497 0
      Gruntfile.js
  9. 12 0
      README.md
  10. BIN
      app/.DS_Store
  11. 1 0
      app/.buildignore
  12. 543 0
      app/.htaccess
  13. 152 0
      app/404.html
  14. BIN
      app/favicon.ico
  15. BIN
      app/images/yeoman.png
  16. 74 0
      app/index.html
  17. 4 0
      app/robots.txt
  18. BIN
      app/scripts/.DS_Store
  19. 68 0
      app/scripts/app.js
  20. 17 0
      app/scripts/controllers/about.js
  21. 44 0
      app/scripts/controllers/get-missions-ctrl.js
  22. 15 0
      app/scripts/controllers/rest-api-v1-ctrl.js
  23. 15 0
      app/scripts/controllers/rulebook-ctrl.js
  24. BIN
      app/scripts/libs/.DS_Store
  25. 1 0
      app/scripts/libs/highlight.min.js
  26. 24 0
      app/scripts/services/get-data.js
  27. BIN
      app/styles/.DS_Store
  28. 137 0
      app/styles/avalanche_theme/docs.scss
  29. 10 0
      app/styles/avalanche_theme/hacks.scss
  30. 54 0
      app/styles/avalanche_theme/tabs.scss
  31. 90 0
      app/styles/main.scss
  32. 44 0
      app/styles/tomorrow-night-eighties.css
  33. BIN
      app/views/.DS_Store
  34. 1 0
      app/views/about.html
  35. 81 0
      app/views/get-mission.html
  36. 88 0
      app/views/get-missions.html
  37. 17 0
      app/views/getting-started.html
  38. 23 0
      app/views/main.html
  39. 105 0
      app/views/rest-api-v1.html
  40. 39 0
      app/views/rulebook.html
  41. 6 0
      app/views/rulebook/introduction.html
  42. 6 0
      app/views/rulebook/mission.html
  43. 3 0
      app/views/snipets/jquery/get-missions-example.html
  44. 4 0
      app/views/snipets/json/get-missions-failure-response-example.html
  45. 66 0
      app/views/snipets/json/get-missions-success-response-example.html
  46. 33 0
      bower.json
  47. 40 0
      package.json
  48. 18 0
      test/.jshintrc
  49. 89 0
      test/karma.conf.js
  50. 23 0
      test/spec/controllers/about.js
  51. 23 0
      test/spec/controllers/main.js

+ 3 - 0
.bowerrc

@@ -0,0 +1,3 @@
1
+{
2
+  "directory": "bower_components"
3
+}

+ 21 - 0
.editorconfig

@@ -0,0 +1,21 @@
1
+# EditorConfig helps developers define and maintain consistent
2
+# coding styles between different editors and IDEs
3
+# editorconfig.org
4
+
5
+root = true
6
+
7
+
8
+[*]
9
+
10
+# Change these settings to your own preference
11
+indent_style = space
12
+indent_size = 2
13
+
14
+# We recommend you to keep these unchanged
15
+end_of_line = lf
16
+charset = utf-8
17
+trim_trailing_whitespace = true
18
+insert_final_newline = true
19
+
20
+[*.md]
21
+trim_trailing_whitespace = false

+ 1 - 0
.gitattributes

@@ -0,0 +1 @@
1
+* text=auto

+ 6 - 0
.gitignore

@@ -0,0 +1,6 @@
1
+/node_modules
2
+/dist
3
+/.tmp
4
+/.sass-cache
5
+/bower_components
6
+.DS-Store

+ 16 - 0
.jshintrc

@@ -0,0 +1,16 @@
1
+{
2
+  "bitwise": true,
3
+  "browser": true,
4
+  "curly": true,
5
+  "eqeqeq": true,
6
+  "esnext": true,
7
+  "latedef": true,
8
+  "noarg": true,
9
+  "node": true,
10
+  "strict": true,
11
+  "undef": true,
12
+  "unused": true,
13
+  "globals": {
14
+    "angular": false
15
+  }
16
+}

+ 9 - 0
.travis.yml

@@ -0,0 +1,9 @@
1
+sudo: false
2
+language: node_js
3
+node_js:
4
+  - 'iojs'
5
+  - '0.12'
6
+  - '0.10'
7
+before_script:
8
+  - 'npm install -g bower grunt-cli'
9
+  - 'bower install'

+ 1 - 0
.yo-rc.json

@@ -0,0 +1 @@
1
+{}

+ 497 - 0
Gruntfile.js

@@ -0,0 +1,497 @@
1
+// Generated on 2015-08-20 using generator-angular 0.12.1
2
+'use strict';
3
+
4
+// # Globbing
5
+// for performance reasons we're only matching one level down:
6
+// 'test/spec/{,*/}*.js'
7
+// use this if you want to recursively match all subfolders:
8
+// 'test/spec/**/*.js'
9
+
10
+module.exports = function (grunt) {
11
+
12
+  // Time how long tasks take. Can help when optimizing build times
13
+  require('time-grunt')(grunt);
14
+
15
+  // Automatically load required Grunt tasks
16
+  require('jit-grunt')(grunt, {
17
+    useminPrepare: 'grunt-usemin',
18
+    ngtemplates: 'grunt-angular-templates',
19
+    cdnify: 'grunt-google-cdn'
20
+  });
21
+
22
+  // Configurable paths for the application
23
+  var appConfig = {
24
+    app: require('./bower.json').appPath || 'app',
25
+    dist: 'dist'
26
+  };
27
+
28
+  // Define the configuration for all the tasks
29
+  grunt.initConfig({
30
+
31
+    // Project settings
32
+    yeoman: appConfig,
33
+
34
+    // Watches files for changes and runs tasks based on the changed files
35
+    watch: {
36
+      bower: {
37
+        files: ['bower.json'],
38
+        tasks: ['wiredep']
39
+      },
40
+      js: {
41
+        files: ['<%= yeoman.app %>/scripts/{,*/}*.js'],
42
+        tasks: ['newer:jshint:all'],
43
+        options: {
44
+          livereload: '<%= connect.options.livereload %>'
45
+        }
46
+      },
47
+      jsTest: {
48
+        files: ['test/spec/{,*/}*.js'],
49
+        tasks: ['newer:jshint:test', 'karma']
50
+      },
51
+      compass: {
52
+        files: ['<%= yeoman.app %>/styles/{,*/}*.{scss,sass}'],
53
+        tasks: ['compass:server', 'autoprefixer:server']
54
+      },
55
+      gruntfile: {
56
+        files: ['Gruntfile.js']
57
+      },
58
+      livereload: {
59
+        options: {
60
+          livereload: '<%= connect.options.livereload %>'
61
+        },
62
+        files: [
63
+          '<%= yeoman.app %>/{,*/}*.html',
64
+          '.tmp/styles/{,*/}*.css',
65
+          '<%= yeoman.app %>/images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}'
66
+        ]
67
+      }
68
+    },
69
+
70
+    // The actual grunt server settings
71
+    connect: {
72
+      options: {
73
+        port: 9000,
74
+        // Change this to '0.0.0.0' to access the server from outside.
75
+        hostname: 'localhost',
76
+        livereload: 35729
77
+      },
78
+      livereload: {
79
+        options: {
80
+          open: true,
81
+          middleware: function (connect) {
82
+            return [
83
+              connect.static('.tmp'),
84
+              connect().use(
85
+                '/bower_components',
86
+                connect.static('./bower_components')
87
+              ),
88
+              connect().use(
89
+                '/app/styles',
90
+                connect.static('./app/styles')
91
+              ),
92
+              connect.static(appConfig.app)
93
+            ];
94
+          }
95
+        }
96
+      },
97
+      test: {
98
+        options: {
99
+          port: 9001,
100
+          middleware: function (connect) {
101
+            return [
102
+              connect.static('.tmp'),
103
+              connect.static('test'),
104
+              connect().use(
105
+                '/bower_components',
106
+                connect.static('./bower_components')
107
+              ),
108
+              connect.static(appConfig.app)
109
+            ];
110
+          }
111
+        }
112
+      },
113
+      dist: {
114
+        options: {
115
+          open: true,
116
+          base: '<%= yeoman.dist %>'
117
+        }
118
+      }
119
+    },
120
+
121
+    // Make sure code styles are up to par and there are no obvious mistakes
122
+    jshint: {
123
+      options: {
124
+        jshintrc: '.jshintrc',
125
+        reporter: require('jshint-stylish')
126
+      },
127
+      all: {
128
+        src: [
129
+          'Gruntfile.js',
130
+          '<%= yeoman.app %>/scripts/{,*/}*.js'
131
+        ]
132
+      },
133
+      test: {
134
+        options: {
135
+          jshintrc: 'test/.jshintrc'
136
+        },
137
+        src: ['test/spec/{,*/}*.js']
138
+      }
139
+    },
140
+
141
+    // Empties folders to start fresh
142
+    clean: {
143
+      dist: {
144
+        files: [{
145
+          dot: true,
146
+          src: [
147
+            '.tmp',
148
+            '<%= yeoman.dist %>/{,*/}*',
149
+            '!<%= yeoman.dist %>/.git{,*/}*'
150
+          ]
151
+        }]
152
+      },
153
+      server: '.tmp'
154
+    },
155
+
156
+    // Add vendor prefixed styles
157
+    autoprefixer: {
158
+      options: {
159
+        browsers: ['last 1 version']
160
+      },
161
+      server: {
162
+        options: {
163
+          map: true,
164
+        },
165
+        files: [{
166
+          expand: true,
167
+          cwd: '.tmp/styles/',
168
+          src: '{,*/}*.css',
169
+          dest: '.tmp/styles/'
170
+        }]
171
+      },
172
+      dist: {
173
+        files: [{
174
+          expand: true,
175
+          cwd: '.tmp/styles/',
176
+          src: '{,*/}*.css',
177
+          dest: '.tmp/styles/'
178
+        }]
179
+      }
180
+    },
181
+
182
+    // Automatically inject Bower components into the app
183
+    wiredep: {
184
+      app: {
185
+        src: ['<%= yeoman.app %>/index.html'],
186
+        ignorePath:  /\.\.\//
187
+      },
188
+      test: {
189
+        devDependencies: true,
190
+        src: '<%= karma.unit.configFile %>',
191
+        ignorePath:  /\.\.\//,
192
+        fileTypes:{
193
+          js: {
194
+            block: /(([\s\t]*)\/{2}\s*?bower:\s*?(\S*))(\n|\r|.)*?(\/{2}\s*endbower)/gi,
195
+              detect: {
196
+                js: /'(.*\.js)'/gi
197
+              },
198
+              replace: {
199
+                js: '\'{{filePath}}\','
200
+              }
201
+            }
202
+          }
203
+      },
204
+      sass: {
205
+        src: ['<%= yeoman.app %>/styles/{,*/}*.{scss,sass}'],
206
+        ignorePath: /(\.\.\/){1,2}bower_components\//
207
+      }
208
+    },
209
+
210
+    // Compiles Sass to CSS and generates necessary files if requested
211
+    compass: {
212
+      options: {
213
+        sassDir: '<%= yeoman.app %>/styles',
214
+        cssDir: '.tmp/styles',
215
+        generatedImagesDir: '.tmp/images/generated',
216
+        imagesDir: '<%= yeoman.app %>/images',
217
+        javascriptsDir: '<%= yeoman.app %>/scripts',
218
+        fontsDir: '<%= yeoman.app %>/styles/fonts',
219
+        importPath: './bower_components',
220
+        httpImagesPath: '/images',
221
+        httpGeneratedImagesPath: '/images/generated',
222
+        httpFontsPath: '/styles/fonts',
223
+        relativeAssets: false,
224
+        assetCacheBuster: false,
225
+        raw: 'Sass::Script::Number.precision = 10\n'
226
+      },
227
+      dist: {
228
+        options: {
229
+          generatedImagesDir: '<%= yeoman.dist %>/images/generated'
230
+        }
231
+      },
232
+      server: {
233
+        options: {
234
+          sourcemap: true
235
+        }
236
+      }
237
+    },
238
+
239
+    // Renames files for browser caching purposes
240
+    filerev: {
241
+      dist: {
242
+        src: [
243
+          '<%= yeoman.dist %>/scripts/{,*/}*.js',
244
+          '<%= yeoman.dist %>/styles/{,*/}*.css',
245
+          '<%= yeoman.dist %>/images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}',
246
+          '<%= yeoman.dist %>/styles/fonts/*'
247
+        ]
248
+      }
249
+    },
250
+
251
+    // Reads HTML for usemin blocks to enable smart builds that automatically
252
+    // concat, minify and revision files. Creates configurations in memory so
253
+    // additional tasks can operate on them
254
+    useminPrepare: {
255
+      html: '<%= yeoman.app %>/index.html',
256
+      options: {
257
+        dest: '<%= yeoman.dist %>',
258
+        flow: {
259
+          html: {
260
+            steps: {
261
+              js: ['concat', 'uglifyjs'],
262
+              css: ['cssmin']
263
+            },
264
+            post: {}
265
+          }
266
+        }
267
+      }
268
+    },
269
+
270
+    // Performs rewrites based on filerev and the useminPrepare configuration
271
+    usemin: {
272
+      html: ['<%= yeoman.dist %>/{,*/}*.html'],
273
+      css: ['<%= yeoman.dist %>/styles/{,*/}*.css'],
274
+      js: ['<%= yeoman.dist %>/scripts/{,*/}*.js'],
275
+      options: {
276
+        assetsDirs: [
277
+          '<%= yeoman.dist %>',
278
+          '<%= yeoman.dist %>/images',
279
+          '<%= yeoman.dist %>/styles'
280
+        ],
281
+        patterns: {
282
+          js: [[/(images\/[^''""]*\.(png|jpg|jpeg|gif|webp|svg))/g, 'Replacing references to images']]
283
+        }
284
+      }
285
+    },
286
+
287
+    // The following *-min tasks will produce minified files in the dist folder
288
+    // By default, your `index.html`'s <!-- Usemin block --> will take care of
289
+    // minification. These next options are pre-configured if you do not wish
290
+    // to use the Usemin blocks.
291
+    // cssmin: {
292
+    //   dist: {
293
+    //     files: {
294
+    //       '<%= yeoman.dist %>/styles/main.css': [
295
+    //         '.tmp/styles/{,*/}*.css'
296
+    //       ]
297
+    //     }
298
+    //   }
299
+    // },
300
+    // uglify: {
301
+    //   dist: {
302
+    //     files: {
303
+    //       '<%= yeoman.dist %>/scripts/scripts.js': [
304
+    //         '<%= yeoman.dist %>/scripts/scripts.js'
305
+    //       ]
306
+    //     }
307
+    //   }
308
+    // },
309
+    // concat: {
310
+    //   dist: {}
311
+    // },
312
+
313
+    imagemin: {
314
+      dist: {
315
+        files: [{
316
+          expand: true,
317
+          cwd: '<%= yeoman.app %>/images',
318
+          src: '{,*/}*.{png,jpg,jpeg,gif}',
319
+          dest: '<%= yeoman.dist %>/images'
320
+        }]
321
+      }
322
+    },
323
+
324
+    svgmin: {
325
+      dist: {
326
+        files: [{
327
+          expand: true,
328
+          cwd: '<%= yeoman.app %>/images',
329
+          src: '{,*/}*.svg',
330
+          dest: '<%= yeoman.dist %>/images'
331
+        }]
332
+      }
333
+    },
334
+
335
+    htmlmin: {
336
+      dist: {
337
+        options: {
338
+          collapseWhitespace: true,
339
+          conservativeCollapse: true,
340
+          collapseBooleanAttributes: true,
341
+          removeCommentsFromCDATA: true
342
+        },
343
+        files: [{
344
+          expand: true,
345
+          cwd: '<%= yeoman.dist %>',
346
+          src: ['*.html'],
347
+          dest: '<%= yeoman.dist %>'
348
+        }]
349
+      }
350
+    },
351
+
352
+    ngtemplates: {
353
+      dist: {
354
+        options: {
355
+          module: 'avalancheDocsApp',
356
+          htmlmin: '<%= htmlmin.dist.options %>',
357
+          usemin: 'scripts/scripts.js'
358
+        },
359
+        cwd: '<%= yeoman.app %>',
360
+        src: 'views/{,*/}*.html',
361
+        dest: '.tmp/templateCache.js'
362
+      }
363
+    },
364
+
365
+    // ng-annotate tries to make the code safe for minification automatically
366
+    // by using the Angular long form for dependency injection.
367
+    ngAnnotate: {
368
+      dist: {
369
+        files: [{
370
+          expand: true,
371
+          cwd: '.tmp/concat/scripts',
372
+          src: '*.js',
373
+          dest: '.tmp/concat/scripts'
374
+        }]
375
+      }
376
+    },
377
+
378
+    // Replace Google CDN references
379
+    cdnify: {
380
+      dist: {
381
+        html: ['<%= yeoman.dist %>/*.html']
382
+      }
383
+    },
384
+
385
+    // Copies remaining files to places other tasks can use
386
+    copy: {
387
+      dist: {
388
+        files: [{
389
+          expand: true,
390
+          dot: true,
391
+          cwd: '<%= yeoman.app %>',
392
+          dest: '<%= yeoman.dist %>',
393
+          src: [
394
+            '*.{ico,png,txt}',
395
+            '.htaccess',
396
+            '*.html',
397
+            'images/{,*/}*.{webp}',
398
+            'styles/fonts/{,*/}*.*'
399
+          ]
400
+        }, {
401
+          expand: true,
402
+          cwd: '.tmp/images',
403
+          dest: '<%= yeoman.dist %>/images',
404
+          src: ['generated/*']
405
+        }, {
406
+          expand: true,
407
+          cwd: '.',
408
+          src: 'bower_components/bootstrap-sass-official/assets/fonts/bootstrap/*',
409
+          dest: '<%= yeoman.dist %>'
410
+        }]
411
+      },
412
+      styles: {
413
+        expand: true,
414
+        cwd: '<%= yeoman.app %>/styles',
415
+        dest: '.tmp/styles/',
416
+        src: '{,*/}*.css'
417
+      }
418
+    },
419
+
420
+    // Run some tasks in parallel to speed up the build process
421
+    concurrent: {
422
+      server: [
423
+        'compass:server'
424
+      ],
425
+      test: [
426
+        'compass'
427
+      ],
428
+      dist: [
429
+        'compass:dist',
430
+        'imagemin',
431
+        'svgmin'
432
+      ]
433
+    },
434
+
435
+    // Test settings
436
+    karma: {
437
+      unit: {
438
+        configFile: 'test/karma.conf.js',
439
+        singleRun: true
440
+      }
441
+    }
442
+  });
443
+
444
+
445
+  grunt.registerTask('serve', 'Compile then start a connect web server', function (target) {
446
+    if (target === 'dist') {
447
+      return grunt.task.run(['build', 'connect:dist:keepalive']);
448
+    }
449
+
450
+    grunt.task.run([
451
+      'clean:server',
452
+      'wiredep',
453
+      'concurrent:server',
454
+      'autoprefixer:server',
455
+      'connect:livereload',
456
+      'watch'
457
+    ]);
458
+  });
459
+
460
+  grunt.registerTask('server', 'DEPRECATED TASK. Use the "serve" task instead', function (target) {
461
+    grunt.log.warn('The `server` task has been deprecated. Use `grunt serve` to start a server.');
462
+    grunt.task.run(['serve:' + target]);
463
+  });
464
+
465
+  grunt.registerTask('test', [
466
+    'clean:server',
467
+    'wiredep',
468
+    'concurrent:test',
469
+    'autoprefixer',
470
+    'connect:test',
471
+    'karma'
472
+  ]);
473
+
474
+  grunt.registerTask('build', [
475
+    'clean:dist',
476
+    'wiredep',
477
+    'useminPrepare',
478
+    'concurrent:dist',
479
+    'autoprefixer',
480
+    'ngtemplates',
481
+    'concat',
482
+    'ngAnnotate',
483
+    'copy:dist',
484
+    'cdnify',
485
+    'cssmin',
486
+    'uglify',
487
+    'filerev',
488
+    'usemin',
489
+    'htmlmin'
490
+  ]);
491
+
492
+  grunt.registerTask('default', [
493
+    'newer:jshint',
494
+    'test',
495
+    'build'
496
+  ]);
497
+};

+ 12 - 0
README.md

@@ -0,0 +1,12 @@
1
+# avalanche-docs
2
+
3
+This project is generated with [yo angular generator](https://github.com/yeoman/generator-angular)
4
+version 0.12.1.
5
+
6
+## Build & development
7
+
8
+Run `grunt` for building and `grunt serve` for preview.
9
+
10
+## Testing
11
+
12
+Running `grunt test` will run the unit tests with karma.

BIN
app/.DS_Store


+ 1 - 0
app/.buildignore

@@ -0,0 +1 @@
1
+*.coffee

+ 543 - 0
app/.htaccess

@@ -0,0 +1,543 @@
1
+# Apache Configuration File
2
+
3
+# (!) Using `.htaccess` files slows down Apache, therefore, if you have access
4
+# to the main server config file (usually called `httpd.conf`), you should add
5
+# this logic there: http://httpd.apache.org/docs/current/howto/htaccess.html.
6
+
7
+# ##############################################################################
8
+# # CROSS-ORIGIN RESOURCE SHARING (CORS)                                       #
9
+# ##############################################################################
10
+
11
+# ------------------------------------------------------------------------------
12
+# | Cross-domain AJAX requests                                                 |
13
+# ------------------------------------------------------------------------------
14
+
15
+# Enable cross-origin AJAX requests.
16
+# http://code.google.com/p/html5security/wiki/CrossOriginRequestSecurity
17
+# http://enable-cors.org/
18
+
19
+# <IfModule mod_headers.c>
20
+#    Header set Access-Control-Allow-Origin "*"
21
+# </IfModule>
22
+
23
+# ------------------------------------------------------------------------------
24
+# | CORS-enabled images                                                        |
25
+# ------------------------------------------------------------------------------
26
+
27
+# Send the CORS header for images when browsers request it.
28
+# https://developer.mozilla.org/en/CORS_Enabled_Image
29
+# http://blog.chromium.org/2011/07/using-cross-domain-images-in-webgl-and.html
30
+# http://hacks.mozilla.org/2011/11/using-cors-to-load-webgl-textures-from-cross-domain-images/
31
+
32
+<IfModule mod_setenvif.c>
33
+    <IfModule mod_headers.c>
34
+        <FilesMatch "\.(gif|ico|jpe?g|png|svg|svgz|webp)$">
35
+            SetEnvIf Origin ":" IS_CORS
36
+            Header set Access-Control-Allow-Origin "*" env=IS_CORS
37
+        </FilesMatch>
38
+    </IfModule>
39
+</IfModule>
40
+
41
+# ------------------------------------------------------------------------------
42
+# | Web fonts access                                                           |
43
+# ------------------------------------------------------------------------------
44
+
45
+# Allow access from all domains for web fonts
46
+
47
+<IfModule mod_headers.c>
48
+    <FilesMatch "\.(eot|font.css|otf|ttc|ttf|woff)$">
49
+        Header set Access-Control-Allow-Origin "*"
50
+    </FilesMatch>
51
+</IfModule>
52
+
53
+
54
+# ##############################################################################
55
+# # ERRORS                                                                     #
56
+# ##############################################################################
57
+
58
+# ------------------------------------------------------------------------------
59
+# | 404 error prevention for non-existing redirected folders                   |
60
+# ------------------------------------------------------------------------------
61
+
62
+# Prevent Apache from returning a 404 error for a rewrite if a directory
63
+# with the same name does not exist.
64
+# http://httpd.apache.org/docs/current/content-negotiation.html#multiviews
65
+# http://www.webmasterworld.com/apache/3808792.htm
66
+
67
+Options -MultiViews
68
+
69
+# ------------------------------------------------------------------------------
70
+# | Custom error messages / pages                                              |
71
+# ------------------------------------------------------------------------------
72
+
73
+# You can customize what Apache returns to the client in case of an error (see
74
+# http://httpd.apache.org/docs/current/mod/core.html#errordocument), e.g.:
75
+
76
+ErrorDocument 404 /404.html
77
+
78
+
79
+# ##############################################################################
80
+# # INTERNET EXPLORER                                                          #
81
+# ##############################################################################
82
+
83
+# ------------------------------------------------------------------------------
84
+# | Better website experience                                                  |
85
+# ------------------------------------------------------------------------------
86
+
87
+# Force IE to render pages in the highest available mode in the various
88
+# cases when it may not: http://hsivonen.iki.fi/doctype/ie-mode.pdf.
89
+
90
+<IfModule mod_headers.c>
91
+    Header set X-UA-Compatible "IE=edge"
92
+    # `mod_headers` can't match based on the content-type, however, we only
93
+    # want to send this header for HTML pages and not for the other resources
94
+    <FilesMatch "\.(appcache|crx|css|eot|gif|htc|ico|jpe?g|js|m4a|m4v|manifest|mp4|oex|oga|ogg|ogv|otf|pdf|png|safariextz|svg|svgz|ttf|vcf|webapp|webm|webp|woff|xml|xpi)$">
95
+        Header unset X-UA-Compatible
96
+    </FilesMatch>
97
+</IfModule>
98
+
99
+# ------------------------------------------------------------------------------
100
+# | Cookie setting from iframes                                                |
101
+# ------------------------------------------------------------------------------
102
+
103
+# Allow cookies to be set from iframes in IE.
104
+
105
+# <IfModule mod_headers.c>
106
+#   Header set P3P "policyref=\"/w3c/p3p.xml\", CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\""
107
+# </IfModule>
108
+
109
+# ------------------------------------------------------------------------------
110
+# | Screen flicker                                                             |
111
+# ------------------------------------------------------------------------------
112
+
113
+# Stop screen flicker in IE on CSS rollovers (this only works in
114
+# combination with the `ExpiresByType` directives for images from below).
115
+
116
+# BrowserMatch "MSIE" brokenvary=1
117
+# BrowserMatch "Mozilla/4.[0-9]{2}" brokenvary=1
118
+# BrowserMatch "Opera" !brokenvary
119
+# SetEnvIf brokenvary 1 force-no-vary
120
+
121
+
122
+# ##############################################################################
123
+# # MIME TYPES AND ENCODING                                                    #
124
+# ##############################################################################
125
+
126
+# ------------------------------------------------------------------------------
127
+# | Proper MIME types for all files                                            |
128
+# ------------------------------------------------------------------------------
129
+
130
+<IfModule mod_mime.c>
131
+
132
+  # Audio
133
+    AddType audio/mp4                                   m4a f4a f4b
134
+    AddType audio/ogg                                   oga ogg
135
+
136
+  # JavaScript
137
+    # Normalize to standard type (it's sniffed in IE anyways):
138
+    # http://tools.ietf.org/html/rfc4329#section-7.2
139
+    AddType application/javascript                      js jsonp
140
+    AddType application/json                            json
141
+
142
+  # Video
143
+    AddType video/mp4                                   mp4 m4v f4v f4p
144
+    AddType video/ogg                                   ogv
145
+    AddType video/webm                                  webm
146
+    AddType video/x-flv                                 flv
147
+
148
+  # Web fonts
149
+    AddType application/font-woff                       woff
150
+    AddType application/vnd.ms-fontobject               eot
151
+
152
+    # Browsers usually ignore the font MIME types and sniff the content,
153
+    # however, Chrome shows a warning if other MIME types are used for the
154
+    # following fonts.
155
+    AddType application/x-font-ttf                      ttc ttf
156
+    AddType font/opentype                               otf
157
+
158
+    # Make SVGZ fonts work on iPad:
159
+    # https://twitter.com/FontSquirrel/status/14855840545
160
+    AddType     image/svg+xml                           svg svgz
161
+    AddEncoding gzip                                    svgz
162
+
163
+  # Other
164
+    AddType application/octet-stream                    safariextz
165
+    AddType application/x-chrome-extension              crx
166
+    AddType application/x-opera-extension               oex
167
+    AddType application/x-shockwave-flash               swf
168
+    AddType application/x-web-app-manifest+json         webapp
169
+    AddType application/x-xpinstall                     xpi
170
+    AddType application/xml                             atom rdf rss xml
171
+    AddType image/webp                                  webp
172
+    AddType image/x-icon                                ico
173
+    AddType text/cache-manifest                         appcache manifest
174
+    AddType text/vtt                                    vtt
175
+    AddType text/x-component                            htc
176
+    AddType text/x-vcard                                vcf
177
+
178
+</IfModule>
179
+
180
+# ------------------------------------------------------------------------------
181
+# | UTF-8 encoding                                                             |
182
+# ------------------------------------------------------------------------------
183
+
184
+# Use UTF-8 encoding for anything served as `text/html` or `text/plain`.
185
+AddDefaultCharset utf-8
186
+
187
+# Force UTF-8 for certain file formats.
188
+<IfModule mod_mime.c>
189
+    AddCharset utf-8 .atom .css .js .json .rss .vtt .webapp .xml
190
+</IfModule>
191
+
192
+
193
+# ##############################################################################
194
+# # URL REWRITES                                                               #
195
+# ##############################################################################
196
+
197
+# ------------------------------------------------------------------------------
198
+# | Rewrite engine                                                             |
199
+# ------------------------------------------------------------------------------
200
+
201
+# Turning on the rewrite engine and enabling the `FollowSymLinks` option is
202
+# necessary for the following directives to work.
203
+
204
+# If your web host doesn't allow the `FollowSymlinks` option, you may need to
205
+# comment it out and use `Options +SymLinksIfOwnerMatch` but, be aware of the
206
+# performance impact: http://httpd.apache.org/docs/current/misc/perf-tuning.html#symlinks
207
+
208
+# Also, some cloud hosting services require `RewriteBase` to be set:
209
+# http://www.rackspace.com/knowledge_center/frequently-asked-question/why-is-mod-rewrite-not-working-on-my-site
210
+
211
+<IfModule mod_rewrite.c>
212
+    Options +FollowSymlinks
213
+  # Options +SymLinksIfOwnerMatch
214
+    RewriteEngine On
215
+  # RewriteBase /
216
+</IfModule>
217
+
218
+# ------------------------------------------------------------------------------
219
+# | Suppressing / Forcing the "www." at the beginning of URLs                  |
220
+# ------------------------------------------------------------------------------
221
+
222
+# The same content should never be available under two different URLs especially
223
+# not with and without "www." at the beginning. This can cause SEO problems
224
+# (duplicate content), therefore, you should choose one of the alternatives and
225
+# redirect the other one.
226
+
227
+# By default option 1 (no "www.") is activated:
228
+# http://no-www.org/faq.php?q=class_b
229
+
230
+# If you'd prefer to use option 2, just comment out all the lines from option 1
231
+# and uncomment the ones from option 2.
232
+
233
+# IMPORTANT: NEVER USE BOTH RULES AT THE SAME TIME!
234
+
235
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
236
+
237
+# Option 1: rewrite www.example.com → example.com
238
+
239
+<IfModule mod_rewrite.c>
240
+    RewriteCond %{HTTPS} !=on
241
+    RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
242
+    RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L]
243
+</IfModule>
244
+
245
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
246
+
247
+# Option 2: rewrite example.com → www.example.com
248
+
249
+# Be aware that the following might not be a good idea if you use "real"
250
+# subdomains for certain parts of your website.
251
+
252
+# <IfModule mod_rewrite.c>
253
+#    RewriteCond %{HTTPS} !=on
254
+#    RewriteCond %{HTTP_HOST} !^www\..+$ [NC]
255
+#    RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
256
+# </IfModule>
257
+
258
+
259
+# ##############################################################################
260
+# # SECURITY                                                                   #
261
+# ##############################################################################
262
+
263
+# ------------------------------------------------------------------------------
264
+# | Content Security Policy (CSP)                                              |
265
+# ------------------------------------------------------------------------------
266
+
267
+# You can mitigate the risk of cross-site scripting and other content-injection
268
+# attacks by setting a Content Security Policy which whitelists trusted sources
269
+# of content for your site.
270
+
271
+# The example header below allows ONLY scripts that are loaded from the current
272
+# site's origin (no inline scripts, no CDN, etc). This almost certainly won't
273
+# work as-is for your site!
274
+
275
+# To get all the details you'll need to craft a reasonable policy for your site,
276
+# read: http://html5rocks.com/en/tutorials/security/content-security-policy (or
277
+# see the specification: http://w3.org/TR/CSP).
278
+
279
+# <IfModule mod_headers.c>
280
+#    Header set Content-Security-Policy "script-src 'self'; object-src 'self'"
281
+#    <FilesMatch "\.(appcache|crx|css|eot|gif|htc|ico|jpe?g|js|m4a|m4v|manifest|mp4|oex|oga|ogg|ogv|otf|pdf|png|safariextz|svg|svgz|ttf|vcf|webapp|webm|webp|woff|xml|xpi)$">
282
+#        Header unset Content-Security-Policy
283
+#    </FilesMatch>
284
+# </IfModule>
285
+
286
+# ------------------------------------------------------------------------------
287
+# | File access                                                                |
288
+# ------------------------------------------------------------------------------
289
+
290
+# Block access to directories without a default document.
291
+# Usually you should leave this uncommented because you shouldn't allow anyone
292
+# to surf through every directory on your server (which may includes rather
293
+# private places like the CMS's directories).
294
+
295
+<IfModule mod_autoindex.c>
296
+    Options -Indexes
297
+</IfModule>
298
+
299
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
300
+
301
+# Block access to hidden files and directories.
302
+# This includes directories used by version control systems such as Git and SVN.
303
+
304
+<IfModule mod_rewrite.c>
305
+    RewriteCond %{SCRIPT_FILENAME} -d [OR]
306
+    RewriteCond %{SCRIPT_FILENAME} -f
307
+    RewriteRule "(^|/)\." - [F]
308
+</IfModule>
309
+
310
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
311
+
312
+# Block access to backup and source files.
313
+# These files may be left by some text editors and can pose a great security
314
+# danger when anyone has access to them.
315
+
316
+<FilesMatch "(^#.*#|\.(bak|config|dist|fla|inc|ini|log|psd|sh|sql|sw[op])|~)$">
317
+    Order allow,deny
318
+    Deny from all
319
+    Satisfy All
320
+</FilesMatch>
321
+
322
+# ------------------------------------------------------------------------------
323
+# | Secure Sockets Layer (SSL)                                                 |
324
+# ------------------------------------------------------------------------------
325
+
326
+# Rewrite secure requests properly to prevent SSL certificate warnings, e.g.:
327
+# prevent `https://www.example.com` when your certificate only allows
328
+# `https://secure.example.com`.
329
+
330
+# <IfModule mod_rewrite.c>
331
+#    RewriteCond %{SERVER_PORT} !^443
332
+#    RewriteRule ^ https://example-domain-please-change-me.com%{REQUEST_URI} [R=301,L]
333
+# </IfModule>
334
+
335
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
336
+
337
+# Force client-side SSL redirection.
338
+
339
+# If a user types "example.com" in his browser, the above rule will redirect him
340
+# to the secure version of the site. That still leaves a window of opportunity
341
+# (the initial HTTP connection) for an attacker to downgrade or redirect the
342
+# request. The following header ensures that browser will ONLY connect to your
343
+# server via HTTPS, regardless of what the users type in the address bar.
344
+# http://www.html5rocks.com/en/tutorials/security/transport-layer-security/
345
+
346
+# <IfModule mod_headers.c>
347
+#    Header set Strict-Transport-Security max-age=16070400;
348
+# </IfModule>
349
+
350
+# ------------------------------------------------------------------------------
351
+# | Server software information                                                |
352
+# ------------------------------------------------------------------------------
353
+
354
+# Avoid displaying the exact Apache version number, the description of the
355
+# generic OS-type and the information about Apache's compiled-in modules.
356
+
357
+# ADD THIS DIRECTIVE IN THE `httpd.conf` AS IT WILL NOT WORK IN THE `.htaccess`!
358
+
359
+# ServerTokens Prod
360
+
361
+
362
+# ##############################################################################
363
+# # WEB PERFORMANCE                                                            #
364
+# ##############################################################################
365
+
366
+# ------------------------------------------------------------------------------
367
+# | Compression                                                                |
368
+# ------------------------------------------------------------------------------
369
+
370
+<IfModule mod_deflate.c>
371
+
372
+    # Force compression for mangled headers.
373
+    # http://developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping
374
+    <IfModule mod_setenvif.c>
375
+        <IfModule mod_headers.c>
376
+            SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
377
+            RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
378
+        </IfModule>
379
+    </IfModule>
380
+
381
+    # Compress all output labeled with one of the following MIME-types
382
+    # (for Apache versions below 2.3.7, you don't need to enable `mod_filter`
383
+    #  and can remove the `<IfModule mod_filter.c>` and `</IfModule>` lines
384
+    #  as `AddOutputFilterByType` is still in the core directives).
385
+    <IfModule mod_filter.c>
386
+        AddOutputFilterByType DEFLATE application/atom+xml \
387
+                                      application/javascript \
388
+                                      application/json \
389
+                                      application/rss+xml \
390
+                                      application/vnd.ms-fontobject \
391
+                                      application/x-font-ttf \
392
+                                      application/x-web-app-manifest+json \
393
+                                      application/xhtml+xml \
394
+                                      application/xml \
395
+                                      font/opentype \
396
+                                      image/svg+xml \
397
+                                      image/x-icon \
398
+                                      text/css \
399
+                                      text/html \
400
+                                      text/plain \
401
+                                      text/x-component \
402
+                                      text/xml
403
+    </IfModule>
404
+
405
+</IfModule>
406
+
407
+# ------------------------------------------------------------------------------
408
+# | Content transformations                                                    |
409
+# ------------------------------------------------------------------------------
410
+
411
+# Prevent some of the mobile network providers from modifying the content of
412
+# your site: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.5.
413
+
414
+# <IfModule mod_headers.c>
415
+#    Header set Cache-Control "no-transform"
416
+# </IfModule>
417
+
418
+# ------------------------------------------------------------------------------
419
+# | ETag removal                                                               |
420
+# ------------------------------------------------------------------------------
421
+
422
+# Since we're sending far-future expires headers (see below), ETags can
423
+# be removed: http://developer.yahoo.com/performance/rules.html#etags.
424
+
425
+# `FileETag None` is not enough for every server.
426
+<IfModule mod_headers.c>
427
+    Header unset ETag
428
+</IfModule>
429
+
430
+FileETag None
431
+
432
+# ------------------------------------------------------------------------------
433
+# | Expires headers (for better cache control)                                 |
434
+# ------------------------------------------------------------------------------
435
+
436
+# The following expires headers are set pretty far in the future. If you don't
437
+# control versioning with filename-based cache busting, consider lowering the
438
+# cache time for resources like CSS and JS to something like 1 week.
439
+
440
+<IfModule mod_expires.c>
441
+
442
+    ExpiresActive on
443
+    ExpiresDefault                                      "access plus 1 month"
444
+
445
+  # CSS
446
+    ExpiresByType text/css                              "access plus 1 year"
447
+
448
+  # Data interchange
449
+    ExpiresByType application/json                      "access plus 0 seconds"
450
+    ExpiresByType application/xml                       "access plus 0 seconds"
451
+    ExpiresByType text/xml                              "access plus 0 seconds"
452
+
453
+  # Favicon (cannot be renamed!)
454
+    ExpiresByType image/x-icon                          "access plus 1 week"
455
+
456
+  # HTML components (HTCs)
457
+    ExpiresByType text/x-component                      "access plus 1 month"
458
+
459
+  # HTML
460
+    ExpiresByType text/html                             "access plus 0 seconds"
461
+
462
+  # JavaScript
463
+    ExpiresByType application/javascript                "access plus 1 year"
464
+
465
+  # Manifest files
466
+    ExpiresByType application/x-web-app-manifest+json   "access plus 0 seconds"
467
+    ExpiresByType text/cache-manifest                   "access plus 0 seconds"
468
+
469
+  # Media
470
+    ExpiresByType audio/ogg                             "access plus 1 month"
471
+    ExpiresByType image/gif                             "access plus 1 month"
472
+    ExpiresByType image/jpeg                            "access plus 1 month"
473
+    ExpiresByType image/png                             "access plus 1 month"
474
+    ExpiresByType video/mp4                             "access plus 1 month"
475
+    ExpiresByType video/ogg                             "access plus 1 month"
476
+    ExpiresByType video/webm                            "access plus 1 month"
477
+
478
+  # Web feeds
479
+    ExpiresByType application/atom+xml                  "access plus 1 hour"
480
+    ExpiresByType application/rss+xml                   "access plus 1 hour"
481
+
482
+  # Web fonts
483
+    ExpiresByType application/font-woff                 "access plus 1 month"
484
+    ExpiresByType application/vnd.ms-fontobject         "access plus 1 month"
485
+    ExpiresByType application/x-font-ttf                "access plus 1 month"
486
+    ExpiresByType font/opentype                         "access plus 1 month"
487
+    ExpiresByType image/svg+xml                         "access plus 1 month"
488
+
489
+</IfModule>
490
+
491
+# ------------------------------------------------------------------------------
492
+# | Filename-based cache busting                                               |
493
+# ------------------------------------------------------------------------------
494
+
495
+# If you're not using a build process to manage your filename version revving,
496
+# you might want to consider enabling the following directives to route all
497
+# requests such as `/css/style.12345.css` to `/css/style.css`.
498
+
499
+# To understand why this is important and a better idea than `*.css?v231`, read:
500
+# http://stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring
501
+
502
+# <IfModule mod_rewrite.c>
503
+#    RewriteCond %{REQUEST_FILENAME} !-f
504
+#    RewriteCond %{REQUEST_FILENAME} !-d
505
+#    RewriteRule ^(.+)\.(\d+)\.(js|css|png|jpg|gif)$ $1.$3 [L]
506
+# </IfModule>
507
+
508
+# ------------------------------------------------------------------------------
509
+# | File concatenation                                                         |
510
+# ------------------------------------------------------------------------------
511
+
512
+# Allow concatenation from within specific CSS and JS files, e.g.:
513
+# Inside of `script.combined.js` you could have
514
+#   <!--#include file="libs/jquery.js" -->
515
+#   <!--#include file="plugins/jquery.idletimer.js" -->
516
+# and they would be included into this single file.
517
+
518
+# <IfModule mod_include.c>
519
+#    <FilesMatch "\.combined\.js$">
520
+#        Options +Includes
521
+#        AddOutputFilterByType INCLUDES application/javascript application/json
522
+#        SetOutputFilter INCLUDES
523
+#    </FilesMatch>
524
+#    <FilesMatch "\.combined\.css$">
525
+#        Options +Includes
526
+#        AddOutputFilterByType INCLUDES text/css
527
+#        SetOutputFilter INCLUDES
528
+#    </FilesMatch>
529
+# </IfModule>
530
+
531
+# ------------------------------------------------------------------------------
532
+# | Persistent connections                                                     |
533
+# ------------------------------------------------------------------------------
534
+
535
+# Allow multiple requests to be sent over the same TCP connection:
536
+# http://httpd.apache.org/docs/current/en/mod/core.html#keepalive.
537
+
538
+# Enable if you serve a lot of static content but, be aware of the
539
+# possible disadvantages!
540
+
541
+# <IfModule mod_headers.c>
542
+#    Header set Connection Keep-Alive
543
+# </IfModule>

+ 152 - 0
app/404.html

@@ -0,0 +1,152 @@
1
+<!doctype html>
2
+<html lang="en">
3
+  <head>
4
+    <meta charset="utf-8">
5
+    <title>Page Not Found :(</title>
6
+    <style>
7
+      ::-moz-selection {
8
+        background: #b3d4fc;
9
+        text-shadow: none;
10
+      }
11
+
12
+      ::selection {
13
+        background: #b3d4fc;
14
+        text-shadow: none;
15
+      }
16
+
17
+      html {
18
+        padding: 30px 10px;
19
+        font-size: 20px;
20
+        line-height: 1.4;
21
+        color: #737373;
22
+        background: #f0f0f0;
23
+        -webkit-text-size-adjust: 100%;
24
+        -ms-text-size-adjust: 100%;
25
+      }
26
+
27
+      html,
28
+      input {
29
+        font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
30
+      }
31
+
32
+      body {
33
+        max-width: 500px;
34
+        padding: 30px 20px 50px;
35
+        border: 1px solid #b3b3b3;
36
+        border-radius: 4px;
37
+        margin: 0 auto;
38
+        box-shadow: 0 1px 10px #a7a7a7, inset 0 1px 0 #fff;
39
+        background: #fcfcfc;
40
+      }
41
+
42
+      h1 {
43
+        margin: 0 10px;
44
+        font-size: 50px;
45
+        text-align: center;
46
+      }
47
+
48
+      h1 span {
49
+        color: #bbb;
50
+      }
51
+
52
+      h3 {
53
+        margin: 1.5em 0 0.5em;
54
+      }
55
+
56
+      p {
57
+        margin: 1em 0;
58
+      }
59
+
60
+      ul {
61
+        padding: 0 0 0 40px;
62
+        margin: 1em 0;
63
+      }
64
+
65
+      .container {
66
+        max-width: 380px;
67
+        margin: 0 auto;
68
+      }
69
+
70
+      /* google search */
71
+
72
+      #goog-fixurl ul {
73
+        list-style: none;
74
+        padding: 0;
75
+        margin: 0;
76
+      }
77
+
78
+      #goog-fixurl form {
79
+        margin: 0;
80
+      }
81
+
82
+      #goog-wm-qt,
83
+      #goog-wm-sb {
84
+        border: 1px solid #bbb;
85
+        font-size: 16px;
86
+        line-height: normal;
87
+        vertical-align: top;
88
+        color: #444;
89
+        border-radius: 2px;
90
+      }
91
+
92
+      #goog-wm-qt {
93
+        width: 220px;
94
+        height: 20px;
95
+        padding: 5px;
96
+        margin: 5px 10px 0 0;
97
+        box-shadow: inset 0 1px 1px #ccc;
98
+      }
99
+
100
+      #goog-wm-sb {
101
+        display: inline-block;
102
+        height: 32px;
103
+        padding: 0 10px;
104
+        margin: 5px 0 0;
105
+        white-space: nowrap;
106
+        cursor: pointer;
107
+        background-color: #f5f5f5;
108
+        background-image: -webkit-linear-gradient(rgba(255,255,255,0), #f1f1f1);
109
+        background-image: -moz-linear-gradient(rgba(255,255,255,0), #f1f1f1);
110
+        background-image: -ms-linear-gradient(rgba(255,255,255,0), #f1f1f1);
111
+        background-image: -o-linear-gradient(rgba(255,255,255,0), #f1f1f1);
112
+        -webkit-appearance: none;
113
+        -moz-appearance: none;
114
+        appearance: none;
115
+      }
116
+
117
+      #goog-wm-sb:hover,
118
+      #goog-wm-sb:focus {
119
+        border-color: #aaa;
120
+        box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
121
+        background-color: #f8f8f8;
122
+      }
123
+
124
+      #goog-wm-qt:hover,
125
+      #goog-wm-qt:focus {
126
+        border-color: #105cb6;
127
+        outline: 0;
128
+        color: #222;
129
+      }
130
+
131
+      input::-moz-focus-inner {
132
+        padding: 0;
133
+        border: 0;
134
+      }
135
+    </style>
136
+  </head>
137
+  <body>
138
+    <div class="container">
139
+      <h1>Not found <span>:(</span></h1>
140
+      <p>Sorry, but the page you were trying to view does not exist.</p>
141
+      <p>It looks like this was the result of either:</p>
142
+      <ul>
143
+        <li>a mistyped address</li>
144
+        <li>an out-of-date link</li>
145
+      </ul>
146
+      <script>
147
+        var GOOG_FIXURL_LANG = (navigator.language || '').slice(0,2),GOOG_FIXURL_SITE = location.host;
148
+      </script>
149
+      <script src="//linkhelp.clients.google.com/tbproxy/lh/wm/fixurl.js"></script>
150
+    </div>
151
+  </body>
152
+</html>

BIN
app/favicon.ico


BIN
app/images/yeoman.png


+ 74 - 0
app/index.html

@@ -0,0 +1,74 @@
1
+<!doctype html>
2
+<html>
3
+  <head>
4
+    <meta charset="utf-8">
5
+    <title></title>
6
+    <meta name="description" content="">
7
+    <meta name="viewport" content="width=device-width">
8
+    <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
9
+    <!-- build:css(.) styles/vendor.css -->
10
+    <!-- bower:css -->
11
+    <link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css" />
12
+    <!-- endbower -->
13
+    <!-- endbuild -->
14
+    <!-- build:css(.tmp) styles/main.css -->
15
+    <link rel="stylesheet" href="styles/main.css">
16
+    <link rel="stylesheet" href="styles/avalanche_theme/hacks.css">
17
+    <link rel="stylesheet" href="styles/avalanche_theme/tabs.css">
18
+    <link rel="stylesheet" href="styles/avalanche_theme/docs.css">
19
+    <link rel="stylesheet" href="bower_components/json-formatter/dist/json-formatter.css">
20
+    <!-- endbuild -->
21
+    <link rel="stylesheet" href="styles/tomorrow-night-eighties.css">
22
+    <script src="scripts/libs/highlight.min.js"></script>
23
+  </head>
24
+  <body ng-app="avalancheDocsApp">
25
+    <span us-spinner="{radius:30, width:8, length: 16}" spinner-key="spinner-1"></span>
26
+    <!--[if lte IE 8]>
27
+      <p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
28
+    <![endif]-->
29
+
30
+    <!-- Add your site or application content here -->
31
+    <div ui-view></div>
32
+
33
+
34
+    <!-- Google Analytics: change UA-XXXXX-X to be your site's ID -->
35
+     <script>
36
+       !function(A,n,g,u,l,a,r){A.GoogleAnalyticsObject=l,A[l]=A[l]||function(){
37
+       (A[l].q=A[l].q||[]).push(arguments)},A[l].l=+new Date,a=n.createElement(g),
38
+       r=n.getElementsByTagName(g)[0],a.src=u,r.parentNode.insertBefore(a,r)
39
+       }(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
40
+
41
+       ga('create', 'UA-XXXXX-X');
42
+       ga('send', 'pageview');
43
+    </script>
44
+
45
+    <!-- build:js(.) scripts/vendor.js -->
46
+    <!-- bower:js -->
47
+    <script src="bower_components/jquery/dist/jquery.js"></script>
48
+    <script src="bower_components/angular/angular.js"></script>
49
+    <script src="bower_components/bootstrap/dist/js/bootstrap.js"></script>
50
+    <script src="bower_components/angular-animate/angular-animate.js"></script>
51
+    <script src="bower_components/angular-cookies/angular-cookies.js"></script>
52
+    <script src="bower_components/angular-resource/angular-resource.js"></script>
53
+    <script src="bower_components/angular-route/angular-route.js"></script>
54
+    <script src="bower_components/angular-sanitize/angular-sanitize.js"></script>
55
+    <script src="bower_components/angular-touch/angular-touch.js"></script>
56
+    <script src="bower_components/angular-bootstrap/ui-bootstrap-tpls.js"></script>
57
+    <script src="bower_components/angular-highlightjs/build/angular-highlightjs.js"></script>
58
+    <script src="bower_components/json-formatter/dist/json-formatter.js"></script>
59
+    <script src="bower_components/spin.js/spin.js"></script>
60
+    <script src="bower_components/angular-spinner/angular-spinner.js"></script>
61
+    <script src="bower_components/angular-ui-router/release/angular-ui-router.js"></script>
62
+    <!-- endbower -->
63
+    <!-- endbuild -->
64
+
65
+        <!-- build:js({.tmp,app}) scripts/scripts.js -->
66
+        <script src="scripts/app.js"></script>
67
+        <script src="scripts/controllers/rulebook-ctrl.js"></script>
68
+        <script src="scripts/controllers/rest-api-v1-ctrl.js"></script>
69
+        <script src="scripts/controllers/get-missions-ctrl.js"></script>
70
+        <script src="scripts/controllers/about.js"></script>
71
+        <script src="scripts/services/get-data.js"></script>
72
+        <!-- endbuild -->
73
+</body>
74
+</html>

+ 4 - 0
app/robots.txt

@@ -0,0 +1,4 @@
1
+# robotstxt.org
2
+
3
+User-agent: *
4
+Disallow:

BIN
app/scripts/.DS_Store


+ 68 - 0
app/scripts/app.js

@@ -0,0 +1,68 @@
1
+'use strict';
2
+
3
+/**
4
+ * @ngdoc overview
5
+ * @name avalancheDocsApp
6
+ * @description
7
+ * # avalancheDocsApp
8
+ *
9
+ * Main module of the application.
10
+ */
11
+angular
12
+  .module('avalancheDocsApp', [
13
+    'ngAnimate',
14
+    'ngCookies',
15
+    'ngResource',
16
+    'ui.router',
17
+    'ngSanitize',
18
+    'ngTouch',
19
+    'ui.bootstrap',
20
+    'hljs',
21
+    'jsonFormatter',
22
+    'angularSpinner'
23
+  ])
24
+  .config(['$stateProvider', '$urlRouterProvider', '$httpProvider', function($stateProvider, $urlRouterProvider, $httpProvider) {
25
+    // Configs
26
+    //Enable cross domain calls
27
+    $httpProvider.defaults.useXDomain = true;
28
+    //Remove the header used to identify ajax call  that would prevent CORS from working
29
+    delete $httpProvider.defaults.headers.common['X-Requested-With'];
30
+    // UI router
31
+    $stateProvider
32
+    .state('getting-started', {
33
+      url: "/",
34
+      templateUrl: 'views/getting-started.html',
35
+      controller: 'AboutCtrl'
36
+    })
37
+    .state('rulebook', {
38
+      url: "/rulebook",
39
+      templateUrl: 'views/rulebook.html',
40
+      controller: 'RulebookCtrl'
41
+    })
42
+    .state('rulebook.intro', {
43
+      url: "/intro",
44
+      templateUrl: 'views/rulebook/introduction.html',
45
+      controller: 'AboutCtrl'
46
+    })
47
+    .state('rulebook.mission', {
48
+      url: "/mission",
49
+      templateUrl: 'views/rulebook/mission.html',
50
+      controller: 'AboutCtrl'
51
+    })
52
+    .state('rest-api-v1', {
53
+      url: "/rest-api-v1",
54
+      templateUrl: "views/rest-api-v1.html",
55
+      controller: 'RestAPIv1Ctrl'
56
+    })
57
+    .state('rest-api-v1.get-missions', {
58
+      url: "/get-missions",
59
+      templateUrl: "views/get-missions.html",
60
+      controller: 'GetMissionsController'
61
+    })
62
+    .state('rest-api-v1.get-mission', {
63
+      url: "/get-mission",
64
+      templateUrl: "views/get-mission.html",
65
+      controller: 'GetMissionsController'
66
+    })
67
+
68
+  }]);

+ 17 - 0
app/scripts/controllers/about.js

@@ -0,0 +1,17 @@
1
+'use strict';
2
+
3
+/**
4
+ * @ngdoc function
5
+ * @name avalancheDocsApp.controller:AboutCtrl
6
+ * @description
7
+ * # AboutCtrl
8
+ * Controller of the avalancheDocsApp
9
+ */
10
+angular.module('avalancheDocsApp')
11
+  .controller('AboutCtrl', function () {
12
+    this.awesomeThings = [
13
+      'HTML5 Boilerplate',
14
+      'AngularJS',
15
+      'Karma'
16
+    ];
17
+  });

+ 44 - 0
app/scripts/controllers/get-missions-ctrl.js

@@ -0,0 +1,44 @@
1
+'use strict';
2
+
3
+/**
4
+ * @ngdoc function
5
+ * @name avalancheDocsApp.controller:MainCtrl
6
+ * @description
7
+ * # MainCtrl
8
+ * Controller of the avalancheDocsApp
9
+ */
10
+angular.module('avalancheDocsApp')
11
+  .controller('GetMissionsController',['$scope', '$rootScope', 'GetData', 'usSpinnerService', function ($scope, $rootScope, GetData, usSpinnerService) {
12
+
13
+    $scope.response = {};
14
+    $scope.hideResult = true;
15
+    GetData.get()
16
+
17
+    $scope.call_api = function(url){
18
+      usSpinnerService.spin('spinner-1');
19
+      GetData.fetch(url);
20
+    }
21
+    $scope.hideResponse = function() {
22
+      $scope.hideResult = true;
23
+    }
24
+    $rootScope.$on('get-data:finished', function() {
25
+      if(!$scope.$$phase) {
26
+        $scope.$apply(function(){
27
+          $scope.response = GetData.get();
28
+          $scope.hideResult = false
29
+        });
30
+      } else {
31
+          $scope.response = GetData.get();
32
+          $scope.hideResult = false
33
+      }
34
+      usSpinnerService.stop('spinner-1');
35
+    });
36
+
37
+    $scope.status = function(code) {
38
+      if(code == 200){ return "200 OK"}
39
+    }
40
+    $scope.stringfy = function(data) {
41
+      return JSON.stringify(data, null, 4);
42
+    }
43
+
44
+  }])

+ 15 - 0
app/scripts/controllers/rest-api-v1-ctrl.js

@@ -0,0 +1,15 @@
1
+'use strict';
2
+
3
+/**
4
+ * @ngdoc function
5
+ * @name avalancheDocsApp.controller:AboutCtrl
6
+ * @description
7
+ * # AboutCtrl
8
+ * Controller of the avalancheDocsApp
9
+ */
10
+angular.module('avalancheDocsApp')
11
+  .controller('RestAPIv1Ctrl', ['$scope', '$location', function ($scope, $location) {
12
+    $scope.isActive = function (viewLocation) {
13
+        return viewLocation === $location.path();
14
+    };
15
+  }]);

+ 15 - 0
app/scripts/controllers/rulebook-ctrl.js

@@ -0,0 +1,15 @@
1
+'use strict';
2
+
3
+/**
4
+ * @ngdoc function
5
+ * @name avalancheDocsApp.controller:AboutCtrl
6
+ * @description
7
+ * # AboutCtrl
8
+ * Controller of the avalancheDocsApp
9
+ */
10
+angular.module('avalancheDocsApp')
11
+  .controller('RulebookCtrl', ['$scope', '$location', function ($scope, $location) {
12
+    $scope.isActive = function (viewLocation) {
13
+        return viewLocation === $location.path();
14
+    };
15
+  }]);

BIN
app/scripts/libs/.DS_Store


+ 1 - 0
app/scripts/libs/highlight.min.js

@@ -0,0 +1 @@
1
+var hljs=new function(){function l(o){return o.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;")}function b(p){for(var o=p.firstChild;o;o=o.nextSibling){if(o.nodeName=="CODE"){return o}if(!(o.nodeType==3&&o.nodeValue.match(/\s+/))){break}}}function h(p,o){return Array.prototype.map.call(p.childNodes,function(q){if(q.nodeType==3){return o?q.nodeValue.replace(/\n/g,""):q.nodeValue}if(q.nodeName=="BR"){return"\n"}return h(q,o)}).join("")}function a(q){var p=(q.className+" "+q.parentNode.className).split(/\s+/);p=p.map(function(r){return r.replace(/^language-/,"")});for(var o=0;o<p.length;o++){if(e[p[o]]||p[o]=="no-highlight"){return p[o]}}}function c(q){var o=[];(function p(r,s){for(var t=r.firstChild;t;t=t.nextSibling){if(t.nodeType==3){s+=t.nodeValue.length}else{if(t.nodeName=="BR"){s+=1}else{if(t.nodeType==1){o.push({event:"start",offset:s,node:t});s=p(t,s);o.push({event:"stop",offset:s,node:t})}}}}return s})(q,0);return o}function j(x,v,w){var p=0;var y="";var r=[];function t(){if(x.length&&v.length){if(x[0].offset!=v[0].offset){return(x[0].offset<v[0].offset)?x:v}else{return v[0].event=="start"?x:v}}else{return x.length?x:v}}function s(A){function z(B){return" "+B.nodeName+'="'+l(B.value)+'"'}return"<"+A.nodeName+Array.prototype.map.call(A.attributes,z).join("")+">"}while(x.length||v.length){var u=t().splice(0,1)[0];y+=l(w.substr(p,u.offset-p));p=u.offset;if(u.event=="start"){y+=s(u.node);r.push(u.node)}else{if(u.event=="stop"){var o,q=r.length;do{q--;o=r[q];y+=("</"+o.nodeName.toLowerCase()+">")}while(o!=u.node);r.splice(q,1);while(q<r.length){y+=s(r[q]);q++}}}}return y+l(w.substr(p))}function f(q){function o(s,r){return RegExp(s,"m"+(q.cI?"i":"")+(r?"g":""))}function p(y,w){if(y.compiled){return}y.compiled=true;var s=[];if(y.k){var r={};function z(A,t){t.split(" ").forEach(function(B){var C=B.split("|");r[C[0]]=[A,C[1]?Number(C[1]):1];s.push(C[0])})}y.lR=o(y.l||hljs.IR,true);if(typeof y.k=="string"){z("keyword",y.k)}else{for(var x in y.k){if(!y.k.hasOwnProperty(x)){continue}z(x,y.k[x])}}y.k=r}if(w){if(y.bWK){y.b="\\b("+s.join("|")+")\\s"}y.bR=o(y.b?y.b:"\\B|\\b");if(!y.e&&!y.eW){y.e="\\B|\\b"}if(y.e){y.eR=o(y.e)}y.tE=y.e||"";if(y.eW&&w.tE){y.tE+=(y.e?"|":"")+w.tE}}if(y.i){y.iR=o(y.i)}if(y.r===undefined){y.r=1}if(!y.c){y.c=[]}for(var v=0;v<y.c.length;v++){if(y.c[v]=="self"){y.c[v]=y}p(y.c[v],y)}if(y.starts){p(y.starts,w)}var u=[];for(var v=0;v<y.c.length;v++){u.push(y.c[v].b)}if(y.tE){u.push(y.tE)}if(y.i){u.push(y.i)}y.t=u.length?o(u.join("|"),true):{exec:function(t){return null}}}p(q)}function d(D,E){function o(r,M){for(var L=0;L<M.c.length;L++){var K=M.c[L].bR.exec(r);if(K&&K.index==0){return M.c[L]}}}function s(K,r){if(K.e&&K.eR.test(r)){return K}if(K.eW){return s(K.parent,r)}}function t(r,K){return K.i&&K.iR.test(r)}function y(L,r){var K=F.cI?r[0].toLowerCase():r[0];return L.k.hasOwnProperty(K)&&L.k[K]}function G(){var K=l(w);if(!A.k){return K}var r="";var N=0;A.lR.lastIndex=0;var L=A.lR.exec(K);while(L){r+=K.substr(N,L.index-N);var M=y(A,L);if(M){v+=M[1];r+='<span class="'+M[0]+'">'+L[0]+"</span>"}else{r+=L[0]}N=A.lR.lastIndex;L=A.lR.exec(K)}return r+K.substr(N)}function z(){if(A.sL&&!e[A.sL]){return l(w)}var r=A.sL?d(A.sL,w):g(w);if(A.r>0){v+=r.keyword_count;B+=r.r}return'<span class="'+r.language+'">'+r.value+"</span>"}function J(){return A.sL!==undefined?z():G()}function I(L,r){var K=L.cN?'<span class="'+L.cN+'">':"";if(L.rB){x+=K;w=""}else{if(L.eB){x+=l(r)+K;w=""}else{x+=K;w=r}}A=Object.create(L,{parent:{value:A}});B+=L.r}function C(K,r){w+=K;if(r===undefined){x+=J();return 0}var L=o(r,A);if(L){x+=J();I(L,r);return L.rB?0:r.length}var M=s(A,r);if(M){if(!(M.rE||M.eE)){w+=r}x+=J();do{if(A.cN){x+="</span>"}A=A.parent}while(A!=M.parent);if(M.eE){x+=l(r)}w="";if(M.starts){I(M.starts,"")}return M.rE?0:r.length}if(t(r,A)){throw"Illegal"}w+=r;return r.length||1}var F=e[D];f(F);var A=F;var w="";var B=0;var v=0;var x="";try{var u,q,p=0;while(true){A.t.lastIndex=p;u=A.t.exec(E);if(!u){break}q=C(E.substr(p,u.index-p),u[0]);p=u.index+q}C(E.substr(p));return{r:B,keyword_count:v,value:x,language:D}}catch(H){if(H=="Illegal"){return{r:0,keyword_count:0,value:l(E)}}else{throw H}}}function g(s){var o={keyword_count:0,r:0,value:l(s)};var q=o;for(var p in e){if(!e.hasOwnProperty(p)){continue}var r=d(p,s);r.language=p;if(r.keyword_count+r.r>q.keyword_count+q.r){q=r}if(r.keyword_count+r.r>o.keyword_count+o.r){q=o;o=r}}if(q.language){o.second_best=q}return o}function i(q,p,o){if(p){q=q.replace(/^((<[^>]+>|\t)+)/gm,function(r,v,u,t){return v.replace(/\t/g,p)})}if(o){q=q.replace(/\n/g,"<br>")}return q}function m(r,u,p){var v=h(r,p);var t=a(r);if(t=="no-highlight"){return}var w=t?d(t,v):g(v);t=w.language;var o=c(r);if(o.length){var q=document.createElement("pre");q.innerHTML=w.value;w.value=j(o,c(q),v)}w.value=i(w.value,u,p);var s=r.className;if(!s.match("(\\s|^)(language-)?"+t+"(\\s|$)")){s=s?(s+" "+t):t}r.innerHTML=w.value;r.className=s;r.result={language:t,kw:w.keyword_count,re:w.r};if(w.second_best){r.second_best={language:w.second_best.language,kw:w.second_best.keyword_count,re:w.second_best.r}}}function n(){if(n.called){return}n.called=true;Array.prototype.map.call(document.getElementsByTagName("pre"),b).filter(Boolean).forEach(function(o){m(o,hljs.tabReplace)})}function k(){window.addEventListener("DOMContentLoaded",n,false);window.addEventListener("load",n,false)}var e={};this.LANGUAGES=e;this.highlight=d;this.highlightAuto=g;this.fixMarkup=i;this.highlightBlock=m;this.initHighlighting=n;this.initHighlightingOnLoad=k;this.IR="[a-zA-Z][a-zA-Z0-9_]*";this.UIR="[a-zA-Z_][a-zA-Z0-9_]*";this.NR="\\b\\d+(\\.\\d+)?";this.CNR="(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)";this.BNR="\\b(0b[01]+)";this.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|\\.|-|-=|/|/=|:|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";this.BE={b:"\\\\[\\s\\S]",r:0};this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[this.BE],r:0};this.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[this.BE],r:0};this.CLCM={cN:"comment",b:"//",e:"$"};this.CBLCLM={cN:"comment",b:"/\\*",e:"\\*/"};this.HCM={cN:"comment",b:"#",e:"$"};this.NM={cN:"number",b:this.NR,r:0};this.CNM={cN:"number",b:this.CNR,r:0};this.BNM={cN:"number",b:this.BNR,r:0};this.inherit=function(q,r){var o={};for(var p in q){o[p]=q[p]}if(r){for(var p in r){o[p]=r[p]}}return o}}();hljs.LANGUAGES.bash=function(a){var g="true false";var e="if then else elif fi for break continue while in do done echo exit return set declare";var c={cN:"variable",b:"\\$[a-zA-Z0-9_#]+"};var b={cN:"variable",b:"\\${([^}]|\\\\})+}"};var h={cN:"string",b:'"',e:'"',i:"\\n",c:[a.BE,c,b],r:0};var d={cN:"string",b:"'",e:"'",c:[{b:"''"}],r:0};var f={cN:"test_condition",b:"",e:"",c:[h,d,c,b],k:{literal:g},r:0};return{k:{keyword:e,literal:g},c:[{cN:"shebang",b:"(#!\\/bin\\/bash)|(#!\\/bin\\/sh)",r:10},c,b,a.HCM,h,d,a.inherit(f,{b:"\\[ ",e:" \\]",r:0}),a.inherit(f,{b:"\\[\\[ ",e:" \\]\\]"})]}}(hljs);hljs.LANGUAGES.cs=function(a){return{k:"abstract as base bool break byte case catch char checked class const continue decimal default delegate do double else enum event explicit extern false finally fixed float for foreach goto if implicit in int interface internal is lock long namespace new null object operator out override params private protected public readonly ref return sbyte sealed short sizeof stackalloc static string struct switch this throw true try typeof uint ulong unchecked unsafe ushort using virtual volatile void while ascending descending from get group into join let orderby partial select set value var where yield",c:[{cN:"comment",b:"///",e:"$",rB:true,c:[{cN:"xmlDocTag",b:"///|<!--|-->"},{cN:"xmlDocTag",b:"</?",e:">"}]},a.CLCM,a.CBLCLM,{cN:"preprocessor",b:"#",e:"$",k:"if else elif endif define undef warning error line region endregion pragma checksum"},{cN:"string",b:'@"',e:'"',c:[{b:'""'}]},a.ASM,a.QSM,a.CNM]}}(hljs);hljs.LANGUAGES.ruby=function(e){var a="[a-zA-Z_][a-zA-Z0-9_]*(\\!|\\?)?";var j="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?";var g={keyword:"and false then defined module in return redo if BEGIN retry end for true self when next until do begin unless END rescue nil else break undef not super class case require yield alias while ensure elsif or include"};var c={cN:"yardoctag",b:"@[A-Za-z]+"};var k=[{cN:"comment",b:"#",e:"$",c:[c]},{cN:"comment",b:"^\\=begin",e:"^\\=end",c:[c],r:10},{cN:"comment",b:"^__END__",e:"\\n$"}];var d={cN:"subst",b:"#\\{",e:"}",l:a,k:g};var i=[e.BE,d];var b=[{cN:"string",b:"'",e:"'",c:i,r:0},{cN:"string",b:'"',e:'"',c:i,r:0},{cN:"string",b:"%[qw]?\\(",e:"\\)",c:i},{cN:"string",b:"%[qw]?\\[",e:"\\]",c:i},{cN:"string",b:"%[qw]?{",e:"}",c:i},{cN:"string",b:"%[qw]?<",e:">",c:i,r:10},{cN:"string",b:"%[qw]?/",e:"/",c:i,r:10},{cN:"string",b:"%[qw]?%",e:"%",c:i,r:10},{cN:"string",b:"%[qw]?-",e:"-",c:i,r:10},{cN:"string",b:"%[qw]?\\|",e:"\\|",c:i,r:10}];var h={cN:"function",bWK:true,e:" |$|;",k:"def",c:[{cN:"title",b:j,l:a,k:g},{cN:"params",b:"\\(",e:"\\)",l:a,k:g}].concat(k)};var f=k.concat(b.concat([{cN:"class",bWK:true,e:"$|;",k:"class module",c:[{cN:"title",b:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?",r:0},{cN:"inheritance",b:"<\\s*",c:[{cN:"parent",b:"("+e.IR+"::)?"+e.IR}]}].concat(k)},h,{cN:"constant",b:"(::)?(\\b[A-Z]\\w*(::)?)+",r:0},{cN:"symbol",b:":",c:b.concat([{b:j}]),r:0},{cN:"symbol",b:a+":",r:0},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{cN:"number",b:"\\?\\w"},{cN:"variable",b:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{b:"("+e.RSR+")\\s*",c:k.concat([{cN:"regexp",b:"/",e:"/[a-z]*",i:"\\n",c:[e.BE,d]}]),r:0}]));d.c=f;h.c[1].c=f;return{l:a,k:g,c:f}}(hljs);hljs.LANGUAGES.diff=function(a){return{c:[{cN:"chunk",b:"^\\@\\@ +\\-\\d+,\\d+ +\\+\\d+,\\d+ +\\@\\@$",r:10},{cN:"chunk",b:"^\\*\\*\\* +\\d+,\\d+ +\\*\\*\\*\\*$",r:10},{cN:"chunk",b:"^\\-\\-\\- +\\d+,\\d+ +\\-\\-\\-\\-$",r:10},{cN:"header",b:"Index: ",e:"$"},{cN:"header",b:"=====",e:"=====$"},{cN:"header",b:"^\\-\\-\\-",e:"$"},{cN:"header",b:"^\\*{3} ",e:"$"},{cN:"header",b:"^\\+\\+\\+",e:"$"},{cN:"header",b:"\\*{5}",e:"\\*{5}$"},{cN:"addition",b:"^\\+",e:"$"},{cN:"deletion",b:"^\\-",e:"$"},{cN:"change",b:"^\\!",e:"$"}]}}(hljs);hljs.LANGUAGES.javascript=function(a){return{k:{keyword:"in if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const",literal:"true false null undefined NaN Infinity"},c:[a.ASM,a.QSM,a.CLCM,a.CBLCLM,a.CNM,{b:"("+a.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[a.CLCM,a.CBLCLM,{cN:"regexp",b:"/",e:"/[gim]*",i:"\\n",c:[{b:"\\\\/"}]},{b:"<",e:">;",sL:"xml"}],r:0},{cN:"function",bWK:true,e:"{",k:"function",c:[{cN:"title",b:"[A-Za-z$_][0-9A-Za-z$_]*"},{cN:"params",b:"\\(",e:"\\)",c:[a.CLCM,a.CBLCLM],i:"[\"'\\(]"}],i:"\\[|%"}]}}(hljs);hljs.LANGUAGES.css=function(a){var b={cN:"function",b:a.IR+"\\(",e:"\\)",c:[a.NM,a.ASM,a.QSM]};return{cI:true,i:"[=/|']",c:[a.CBLCLM,{cN:"id",b:"\\#[A-Za-z0-9_-]+"},{cN:"class",b:"\\.[A-Za-z0-9_-]+",r:0},{cN:"attr_selector",b:"\\[",e:"\\]",i:"$"},{cN:"pseudo",b:":(:)?[a-zA-Z0-9\\_\\-\\+\\(\\)\\\"\\']+"},{cN:"at_rule",b:"@(font-face|page)",l:"[a-z-]+",k:"font-face page"},{cN:"at_rule",b:"@",e:"[{;]",eE:true,k:"import page media charset",c:[b,a.ASM,a.QSM,a.NM]},{cN:"tag",b:a.IR,r:0},{cN:"rules",b:"{",e:"}",i:"[^\\s]",r:0,c:[a.CBLCLM,{cN:"rule",b:"[^\\s]",rB:true,e:";",eW:true,c:[{cN:"attribute",b:"[A-Z\\_\\.\\-]+",e:":",eE:true,i:"[^\\s]",starts:{cN:"value",eW:true,eE:true,c:[b,a.NM,a.QSM,a.ASM,a.CBLCLM,{cN:"hexcolor",b:"\\#[0-9A-F]+"},{cN:"important",b:"!important"}]}}]}]}]}}(hljs);hljs.LANGUAGES.xml=function(a){var c="[A-Za-z0-9\\._:-]+";var b={eW:true,c:[{cN:"attribute",b:c,r:0},{b:'="',rB:true,e:'"',c:[{cN:"value",b:'"',eW:true}]},{b:"='",rB:true,e:"'",c:[{cN:"value",b:"'",eW:true}]},{b:"=",c:[{cN:"value",b:"[^\\s/>]+"}]}]};return{cI:true,c:[{cN:"pi",b:"<\\?",e:"\\?>",r:10},{cN:"doctype",b:"<!DOCTYPE",e:">",r:10,c:[{b:"\\[",e:"\\]"}]},{cN:"comment",b:"<!--",e:"-->",r:10},{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"<style(?=\\s|>|$)",e:">",k:{title:"style"},c:[b],starts:{e:"</style>",rE:true,sL:"css"}},{cN:"tag",b:"<script(?=\\s|>|$)",e:">",k:{title:"script"},c:[b],starts:{e:"<\/script>",rE:true,sL:"javascript"}},{b:"<%",e:"%>",sL:"vbscript"},{cN:"tag",b:"</?",e:"/?>",c:[{cN:"title",b:"[^ />]+"},b]}]}}(hljs);hljs.LANGUAGES.http=function(a){return{i:"\\S",c:[{cN:"status",b:"^HTTP/[0-9\\.]+",e:"$",c:[{cN:"number",b:"\\b\\d{3}\\b"}]},{cN:"request",b:"^[A-Z]+ (.*?) HTTP/[0-9\\.]+$",rB:true,e:"$",c:[{cN:"string",b:" ",e:" ",eB:true,eE:true}]},{cN:"attribute",b:"^\\w",e:": ",eE:true,i:"\\n|\\s|=",starts:{cN:"string",e:"$"}},{b:"\\n\\n",starts:{sL:"",eW:true}}]}}(hljs);hljs.LANGUAGES.java=function(a){return{k:"false synchronized int abstract float private char boolean static null if const for true while long throw strictfp finally protected import native final return void enum else break transient new catch instanceof byte super volatile case assert short package default double public try this switch continue throws",c:[{cN:"javadoc",b:"/\\*\\*",e:"\\*/",c:[{cN:"javadoctag",b:"@[A-Za-z]+"}],r:10},a.CLCM,a.CBLCLM,a.ASM,a.QSM,{cN:"class",bWK:true,e:"{",k:"class interface",i:":",c:[{bWK:true,k:"extends implements",r:10},{cN:"title",b:a.UIR}]},a.CNM,{cN:"annotation",b:"@[A-Za-z]+"}]}}(hljs);hljs.LANGUAGES.php=function(a){var e={cN:"variable",b:"\\$+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*"};var b=[a.inherit(a.ASM,{i:null}),a.inherit(a.QSM,{i:null}),{cN:"string",b:'b"',e:'"',c:[a.BE]},{cN:"string",b:"b'",e:"'",c:[a.BE]}];var c=[a.BNM,a.CNM];var d={cN:"title",b:a.UIR};return{cI:true,k:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return implements parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception php_user_filter default die require __FUNCTION__ enddeclare final try this switch continue endfor endif declare unset true false namespace trait goto instanceof insteadof __DIR__ __NAMESPACE__ __halt_compiler",c:[a.CLCM,a.HCM,{cN:"comment",b:"/\\*",e:"\\*/",c:[{cN:"phpdoc",b:"\\s@[A-Za-z]+"}]},{cN:"comment",eB:true,b:"__halt_compiler.+?;",eW:true},{cN:"string",b:"<<<['\"]?\\w+['\"]?$",e:"^\\w+;",c:[a.BE]},{cN:"preprocessor",b:"<\\?php",r:10},{cN:"preprocessor",b:"\\?>"},e,{cN:"function",bWK:true,e:"{",k:"function",i:"\\$|\\[|%",c:[d,{cN:"params",b:"\\(",e:"\\)",c:["self",e,a.CBLCLM].concat(b).concat(c)}]},{cN:"class",bWK:true,e:"{",k:"class",i:"[:\\(\\$]",c:[{bWK:true,eW:true,k:"extends",c:[d]},d]},{b:"=>"}].concat(b).concat(c)}}(hljs);hljs.LANGUAGES.python=function(a){var f={cN:"prompt",b:"^(>>>|\\.\\.\\.) "};var c=[{cN:"string",b:"(u|b)?r?'''",e:"'''",c:[f],r:10},{cN:"string",b:'(u|b)?r?"""',e:'"""',c:[f],r:10},{cN:"string",b:"(u|r|ur)'",e:"'",c:[a.BE],r:10},{cN:"string",b:'(u|r|ur)"',e:'"',c:[a.BE],r:10},{cN:"string",b:"(b|br)'",e:"'",c:[a.BE]},{cN:"string",b:'(b|br)"',e:'"',c:[a.BE]}].concat([a.ASM,a.QSM]);var e={cN:"title",b:a.UIR};var d={cN:"params",b:"\\(",e:"\\)",c:["self",a.CNM,f].concat(c)};var b={bWK:true,e:":",i:"[${=;\\n]",c:[e,d],r:10};return{k:{keyword:"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda nonlocal|10",built_in:"None True False Ellipsis NotImplemented"},i:"(</|->|\\?)",c:c.concat([f,a.HCM,a.inherit(b,{cN:"function",k:"def"}),a.inherit(b,{cN:"class",k:"class"}),a.CNM,{cN:"decorator",b:"@",e:"$"},{b:"\\b(print|exec)\\("}])}}(hljs);hljs.LANGUAGES.sql=function(a){return{cI:true,c:[{cN:"operator",b:"(begin|start|commit|rollback|savepoint|lock|alter|create|drop|rename|call|delete|do|handler|insert|load|replace|select|truncate|update|set|show|pragma|grant)\\b(?!:)",e:";",eW:true,k:{keyword:"all partial global month current_timestamp using go revoke smallint indicator end-exec disconnect zone with character assertion to add current_user usage input local alter match collate real then rollback get read timestamp session_user not integer bit unique day minute desc insert execute like ilike|2 level decimal drop continue isolation found where constraints domain right national some module transaction relative second connect escape close system_user for deferred section cast current sqlstate allocate intersect deallocate numeric public preserve full goto initially asc no key output collation group by union session both last language constraint column of space foreign deferrable prior connection unknown action commit view or first into float year primary cascaded except restrict set references names table outer open select size are rows from prepare distinct leading create only next inner authorization schema corresponding option declare precision immediate else timezone_minute external varying translation true case exception join hour default double scroll value cursor descriptor values dec fetch procedure delete and false int is describe char as at in varchar null trailing any absolute current_time end grant privileges when cross check write current_date pad begin temporary exec time update catalog user sql date on identity timezone_hour natural whenever interval work order cascade diagnostics nchar having left call do handler load replace truncate start lock show pragma exists number",aggregate:"count sum min max avg"},c:[{cN:"string",b:"'",e:"'",c:[a.BE,{b:"''"}],r:0},{cN:"string",b:'"',e:'"',c:[a.BE,{b:'""'}],r:0},{cN:"string",b:"`",e:"`",c:[a.BE]},a.CNM]},a.CBLCLM,{cN:"comment",b:"--",e:"$"}]}}(hljs);hljs.LANGUAGES.ini=function(a){return{cI:true,i:"[^\\s]",c:[{cN:"comment",b:";",e:"$"},{cN:"title",b:"^\\[",e:"\\]"},{cN:"setting",b:"^[a-z0-9\\[\\]_-]+[ \\t]*=[ \\t]*",e:"$",c:[{cN:"value",eW:true,k:"on off true false yes no",c:[a.QSM,a.NM]}]}]}}(hljs);hljs.LANGUAGES.perl=function(e){var a="getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qqfileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmgetsub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedirioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when";var d={cN:"subst",b:"[$@]\\{",e:"\\}",k:a,r:10};var b={cN:"variable",b:"\\$\\d"};var i={cN:"variable",b:"[\\$\\%\\@\\*](\\^\\w\\b|#\\w+(\\:\\:\\w+)*|[^\\s\\w{]|{\\w+}|\\w+(\\:\\:\\w*)*)"};var f=[e.BE,d,b,i];var h={b:"->",c:[{b:e.IR},{b:"{",e:"}"}]};var g={cN:"comment",b:"^(__END__|__DATA__)",e:"\\n$",r:5};var c=[b,i,e.HCM,g,{cN:"comment",b:"^\\=\\w",e:"\\=cut",eW:true},h,{cN:"string",b:"q[qwxr]?\\s*\\(",e:"\\)",c:f,r:5},{cN:"string",b:"q[qwxr]?\\s*\\[",e:"\\]",c:f,r:5},{cN:"string",b:"q[qwxr]?\\s*\\{",e:"\\}",c:f,r:5},{cN:"string",b:"q[qwxr]?\\s*\\|",e:"\\|",c:f,r:5},{cN:"string",b:"q[qwxr]?\\s*\\<",e:"\\>",c:f,r:5},{cN:"string",b:"qw\\s+q",e:"q",c:f,r:5},{cN:"string",b:"'",e:"'",c:[e.BE],r:0},{cN:"string",b:'"',e:'"',c:f,r:0},{cN:"string",b:"`",e:"`",c:[e.BE]},{cN:"string",b:"{\\w+}",r:0},{cN:"string",b:"-?\\w+\\s*\\=\\>",r:0},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{b:"("+e.RSR+"|\\b(split|return|print|reverse|grep)\\b)\\s*",k:"split return print reverse grep",r:0,c:[e.HCM,g,{cN:"regexp",b:"(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*",r:10},{cN:"regexp",b:"(m|qr)?/",e:"/[a-z]*",c:[e.BE],r:0}]},{cN:"sub",bWK:true,e:"(\\s*\\(.*?\\))?[;{]",k:"sub",r:5},{cN:"operator",b:"-\\w\\b",r:0}];d.c=c;h.c[1].c=c;return{k:a,c:c}}(hljs);hljs.LANGUAGES.json=function(a){var e={literal:"true false null"};var d=[a.QSM,a.CNM];var c={cN:"value",e:",",eW:true,eE:true,c:d,k:e};var b={b:"{",e:"}",c:[{cN:"attribute",b:'\\s*"',e:'"\\s*:\\s*',eB:true,eE:true,c:[a.BE],i:"\\n",starts:c}],i:"\\S"};var f={b:"\\[",e:"\\]",c:[a.inherit(c,{cN:null})],i:"\\S"};d.splice(d.length,0,b,f);return{c:d,k:e,i:"\\S"}}(hljs);hljs.LANGUAGES.cpp=function(a){var b={keyword:"false int float while private char catch export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const struct for static_cast|10 union namespace unsigned long throw volatile static protected bool template mutable if public friend do return goto auto void enum else break new extern using true class asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue wchar_t inline delete alignof char16_t char32_t constexpr decltype noexcept nullptr static_assert thread_local restrict _Bool complex",built_in:"std string cin cout cerr clog stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr"};return{k:b,i:"</",c:[a.CLCM,a.CBLCLM,a.QSM,{cN:"string",b:"'\\\\?.",e:"'",i:"."},{cN:"number",b:"\\b(\\d+(\\.\\d*)?|\\.\\d+)(u|U|l|L|ul|UL|f|F)"},a.CNM,{cN:"preprocessor",b:"#",e:"$"},{cN:"stl_container",b:"\\b(deque|list|queue|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<",e:">",k:b,r:10,c:["self"]}]}}(hljs);

+ 24 - 0
app/scripts/services/get-data.js

@@ -0,0 +1,24 @@
1
+angular.module('avalancheDocsApp')
2
+.service('GetData', [ '$rootScope', '$http',  function($rootScope, $http) {
3
+  var response = {};
4
+  this.fetch = function(url){
5
+    console.log("Requesting data from " + url)
6
+    $http({
7
+      method: 'GET',
8
+      url: 'http://localhost:5000/api' + url
9
+    }).success(function(data, status, headers, config) {
10
+      console.log("API Request SUCCESSFULL")
11
+
12
+      response.data = data;
13
+      response.status = status;
14
+      response.headers = headers;
15
+      response.config = config;
16
+      console.log(response)
17
+      $rootScope.$broadcast('get-data:finished');
18
+    });
19
+  }
20
+  this.get = function() {
21
+    return response;
22
+  }
23
+
24
+}])

BIN
app/styles/.DS_Store


+ 137 - 0
app/styles/avalanche_theme/docs.scss

@@ -0,0 +1,137 @@
1
+/*
2
+ * Base structure
3
+ */
4
+
5
+/*
6
+ * Global add-ons
7
+ */
8
+
9
+.sub-header {
10
+  padding-bottom: 10px;
11
+  border-bottom: 1px solid #eee;
12
+}
13
+
14
+/*
15
+ * Top navigation
16
+ * Hide default border to remove 1px line.
17
+ */
18
+.navbar-fixed-top {
19
+  border: 0;
20
+}
21
+
22
+/*
23
+ * Sidebar
24
+ */
25
+
26
+/* Hide for mobile, show later */
27
+.sidebar {
28
+  display: none;
29
+}
30
+@media (min-width: 768px) {
31
+  .sidebar {
32
+    position: fixed;
33
+    top: 0;
34
+    bottom: 0;
35
+    z-index: 1000;
36
+    display: block;
37
+    padding: 20px;
38
+    overflow-x: hidden;
39
+    overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
40
+    background-color: #f5f5f5;
41
+  }
42
+}
43
+
44
+/* Sidebar navigation */
45
+.nav-sidebar {
46
+  margin-right: -21px; /* 20px padding + 1px border */
47
+  margin-bottom: 20px;
48
+  margin-left: -20px;
49
+}
50
+.nav-sidebar > li > a {
51
+  padding-right: 20px;
52
+  padding-left: 20px;
53
+}
54
+
55
+.sidebar-main > .nav-sidebar > .active > a,
56
+.sidebar-main > .nav-sidebar > .active > a:hover,
57
+.sidebar-main > .nav-sidebar > .active > a:focus {
58
+  color: #fff;
59
+  background-color: #3C3F47;
60
+  text-decoration: none;
61
+}
62
+
63
+.sidebar-secondary > .nav-sidebar > .active > a,
64
+.sidebar-secondary > .nav-sidebar > .active > a:hover,
65
+.sidebar-secondary > .nav-sidebar > .active > a:focus {
66
+  color: #3C3F47;
67
+  background-color: #E8E8E8;
68
+  text-decoration: none;
69
+}
70
+
71
+.sidebar-main {
72
+  background-color: #5D5B74;
73
+  a {
74
+    color: #F5F5F5;
75
+    padding-top: 4px;
76
+    padding-bottom: 4px;
77
+  }
78
+  a:hover {
79
+    background-color: #3C3F47;
80
+    text-decoration: none;
81
+  }
82
+}
83
+
84
+.sidebar-secondary {
85
+  background-color: #F5F5F5;
86
+  padding-top: 0px;
87
+  padding-bottom: 0px;
88
+  a {
89
+    color: #3C3F47;
90
+    margin: 0;
91
+    padding-top: 7px;
92
+    padding-bottom: 7px;
93
+    text-decoration: none;
94
+  }
95
+  a:hover {
96
+    background-color: #E8E8E8;
97
+    text-decoration: none;
98
+  }
99
+}
100
+
101
+.sidebar h1 {
102
+  color: #F5F5F5;
103
+}
104
+
105
+/*
106
+ * Main content
107
+ */
108
+
109
+.main {
110
+  padding: 20px;
111
+}
112
+@media (min-width: 768px) {
113
+  .main {
114
+    padding-right: 40px;
115
+    padding-left: 40px;
116
+  }
117
+}
118
+.main .page-header {
119
+  margin-top: 0;
120
+}
121
+
122
+
123
+// Hacks
124
+
125
+.api-endpoint > .label { margin-right: 6px;}
126
+
127
+::-webkit-scrollbar {
128
+    width: 4px;
129
+}
130
+
131
+::-webkit-scrollbar-track {
132
+
133
+}
134
+
135
+::-webkit-scrollbar-thumb {
136
+    background-color: #AFB4BF;
137
+}

+ 10 - 0
app/styles/avalanche_theme/hacks.scss

@@ -0,0 +1,10 @@
1
+.top-spacer {
2
+  margin-top: 20px;
3
+}
4
+
5
+.code {
6
+  white-space: nowrap;
7
+  overflow: hidden;
8
+  text-overflow: ellipsis;
9
+  max-width: 100%;
10
+}

+ 54 - 0
app/styles/avalanche_theme/tabs.scss

@@ -0,0 +1,54 @@
1
+.nav-tabs {
2
+    border-bottom: 1px solid #ddd;
3
+    margin-bottom: 10px;
4
+}
5
+
6
+.nav-tabs > li {
7
+    margin-bottom: -1px;
8
+}
9
+
10
+.nav-tabs > li, .nav-pills > li {
11
+    float: left;
12
+}
13
+
14
+.nav-tabs > li {
15
+    line-height: 20px;
16
+}
17
+.nav-tabs > li {
18
+    display: list-item;
19
+    text-align: -webkit-match-parent;
20
+}
21
+
22
+.nav-tabs > .active > a, .nav-tabs > .active.clickable > a:hover, .nav-tabs > .active.clickable > a:focus {
23
+    cursor: pointer;
24
+}
25
+
26
+.nav-tabs > .active > a, .nav-tabs > .active > a:hover, .nav-tabs > .active > a:focus {
27
+    color: #555555;
28
+    background-color: #ffffff;
29
+    border: 1px solid #ddd;
30
+    border-bottom-color: transparent;
31
+    cursor: default;
32
+}
33
+
34
+.nav-tabs > li > a {
35
+    outline: none;
36
+}
37
+
38
+.nav-tabs > li > a {
39
+    padding-top: 8px;
40
+    padding-bottom: 8px;
41
+    line-height: 20px;
42
+    border: 1px solid transparent;
43
+}
44
+
45
+.nav-tabs > li > a {
46
+    padding-right: 12px;
47
+    padding-left: 12px;
48
+    margin-right: 2px;
49
+    line-height: 14px;
50
+}
51
+
52
+.nav > li > a {
53
+    display: block;
54
+}

+ 90 - 0
app/styles/main.scss

@@ -0,0 +1,90 @@
1
+$icon-font-path: "../bower_components/bootstrap-sass-official/assets/fonts/bootstrap/";
2
+// bower:scss
3
+// endbower
4
+
5
+.browsehappy {
6
+  margin: 0.2em 0;
7
+  background: #ccc;
8
+  color: #000;
9
+  padding: 0.2em 0;
10
+}
11
+
12
+body {
13
+  padding: 0;
14
+}
15
+
16
+/* Everything but the jumbotron gets side spacing for mobile first views */
17
+.header,
18
+.marketing,
19
+.footer {
20
+  padding-left: 15px;
21
+  padding-right: 15px;
22
+}
23
+
24
+/* Custom page header */
25
+.header {
26
+  border-bottom: 1px solid #e5e5e5;
27
+  margin-bottom: 10px;
28
+
29
+  /* Make the masthead heading the same height as the navigation */
30
+  h3 {
31
+    margin-top: 0;
32
+    margin-bottom: 0;
33
+    line-height: 40px;
34
+    padding-bottom: 19px;
35
+  }
36
+}
37
+
38
+/* Custom page footer */
39
+.footer {
40
+  padding-top: 19px;
41
+  color: #777;
42
+  border-top: 1px solid #e5e5e5;
43
+}
44
+
45
+.container-narrow > hr {
46
+  margin: 30px 0;
47
+}
48
+
49
+/* Main marketing message and sign up button */
50
+.jumbotron {
51
+  text-align: center;
52
+  border-bottom: 1px solid #e5e5e5;
53
+
54
+  .btn {
55
+    font-size: 21px;
56
+    padding: 14px 24px;
57
+  }
58
+}
59
+
60
+/* Supporting marketing content */
61
+.marketing {
62
+  margin: 40px 0;
63
+
64
+  p + h4 {
65
+    margin-top: 28px;
66
+  }
67
+}
68
+
69
+/* Responsive: Portrait tablets and up */
70
+@media screen and (min-width: 768px) {
71
+  .container {
72
+    max-width: 730px;
73
+  }
74
+
75
+  /* Remove the padding we set earlier */
76
+  .header,
77
+  .marketing,
78
+  .footer {
79
+    padding-left: 0;
80
+    padding-right: 0;
81
+  }
82
+  /* Space out the masthead */
83
+  .header {
84
+    margin-bottom: 30px;
85
+  }
86
+  /* Remove the bottom border on the jumbotron for visual effect */
87
+  .jumbotron {
88
+    border-bottom: 0;
89
+  }
90
+}

+ 44 - 0
app/styles/tomorrow-night-eighties.css

@@ -0,0 +1,44 @@
1
+/* Tomorrow Night Eighties Theme */
2
+/* Original theme - https://github.com/chriskempson/tomorrow-theme */
3
+/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
4
+.tomorrow-comment, pre .comment, pre .title {
5
+  color: #999999;
6
+}
7
+
8
+.tomorrow-red, pre .variable,  pre .regexp, pre .ruby .constant,  pre .xml .pi, pre .xml .doctype, pre .html .doctype, pre .css .id, pre .css .class, pre .css .pseudo {
9
+  color: #f2777a;
10
+}
11
+
12
+.tomorrow-orange, pre .number, pre .preprocessor, pre .built_in, pre .literal, pre .params, pre .constant, pre .ruby .function .title, pre .ruby .title .keyword, pre .keyword {
13
+  color: #D58B49;
14
+}
15
+
16
+.tomorrow-yellow, pre .class, pre .ruby .class .title, pre .css .rules .attribute, pre .attribute, pre .tag, pre .xml .tag .title {
17
+  color: #ECC982;
18
+}
19
+
20
+.tomorrow-green, pre .string, pre .value, pre .inheritance, pre .header, pre .xml .cdata {
21
+  color: #B4C978;
22
+}
23
+
24
+.tomorrow-aqua, pre .css .hexcolor {
25
+  color: #66cccc;
26
+}
27
+
28
+.tomorrow-blue, pre .function, pre .python .decorator, pre .python .title, pre .ruby .symbol, pre .perl .sub, pre .javascript .title, pre .coffeescript .title {
29
+  color: #7AA3BC;
30
+}
31
+
32
+.tomorrow-purple, pre .javascript .function {
33
+  color: #cc99cc;
34
+}
35
+
36
+pre code {
37
+  display: block;
38
+  background: #2F2F2F;
39
+  color: #cccccc;
40
+  font-family: Menlo, Monaco, Consolas, monospace;
41
+  line-height: 1.5;
42
+  border: 1px solid #ccc;
43
+  padding: 10px;
44
+}

BIN
app/views/.DS_Store


+ 1 - 0
app/views/about.html

@@ -0,0 +1 @@
1
+<p>This is the about view.</p>

+ 81 - 0
app/views/get-mission.html

@@ -0,0 +1,81 @@
1
+
2
+
3
+<div class="api-endpoint">
4
+  <h2 style="margin-bottom: 0px;">Mission Details</h2>
5
+  <small class="api-endpoint"><span class="label label-success">GET</span> /missions/:id</small>
6
+  <hr>
7
+
8
+  <h5 class="top-spacer">Variables</h5>
9
+
10
+  <table class="table table-bordered top-spacer">
11
+    <tr>
12
+      <th>password</th>
13
+      <td>Security password for accessing the mission</td>
14
+    </tr>
15
+  </table>
16
+
17
+  <h5>Description</h5>
18
+
19
+  <p class="top-spacer">Returns detailed information about a mission, including lists of all agents, all tasks and recent activity.</p>
20
+
21
+  <h5>Examples</h5>
22
+  <tabset class="top-spacer">
23
+    <tab heading="cURL">
24
+      <div hljs language="bash">curl http://avalanche.network/api/missions/</div>
25
+    </tab>
26
+    <tab heading="jQuery">
27
+      <div hljs language="javascript" include="'views/snipets/jquery/get-missions-example.html'" onload="hljs"></div>
28
+    </tab>
29
+  </tabset>
30
+
31
+  <h5>Responses</h5>
32
+  <tabset class="top-spacer">
33
+    <tab heading="Try It">
34
+      <form class="top-spacer">
35
+        <div class="row">
36
+          <div class="col-sm-8">
37
+            <input type="text" class="form-control" id="exampleInputAmount" placeholder="http://avalanche.network/api/missions" disabled>
38
+          </div>
39
+          <button type="submit" class="btn btn-success" ng-click="call_api('/missions')">Try It</button>
40
+          <button type="submit" class="btn" ng-click="hideResponse()" ng-hide="hideResult">Hide</button>
41
+        </div>
42
+      </form>
43
+      <div class="table-responsive col-sm-12" ng-hide="hideResult">
44
+        <table class="table table-bordered top-spacer" >
45
+          <tr>
46
+            <td colspan="2">{{status(response.status)}}</td>
47
+          </tr>
48
+          <tr>
49
+            <td colspan="2"><json-formatter json="response.data" open="1" style="overflow-x: hidden;"></json-formatter></td>
50
+          </tr>
51
+          <tr>
52
+            <td>Method</td>
53
+            <td>{{response.config.method}}</i></td>
54
+          </tr>
55
+          <tr>
56
+            <td>Request Headers</td>
57
+            <td>{{response.config.headers.Accept}}</td>
58
+          </tr>
59
+          <tr>
60
+            <td>URL</td>
61
+            <td>{{response.config.url}}</td>
62
+          </tr>
63
+          <tr>
64
+            <td>Status</td>
65
+            <td>{{status(response.status)}}</td>
66
+          </tr>
67
+          <tr >
68
+            <td style="min-width: 150px;">Response Headers</td>
69
+            <td>{{stringfy(response.headers())}}</td>
70
+          </tr>
71
+        </table>
72
+      </div>
73
+    </tab>
74
+    <tab heading="Success Example">
75
+      <div hljs language="json" include="'views/snipets/json/get-missions-success-response-example.html'"></div>
76
+    </tab>
77
+    <tab heading="Failure Example">
78
+      <div hljs language="json" include="'views/snipets/json/get-missions-failure-response-example.html'"></div>
79
+    </tab>
80
+  </tabset>
81
+</div>

+ 88 - 0
app/views/get-missions.html

@@ -0,0 +1,88 @@
1
+
2
+
3
+<div class="api-endpoint">
4
+  <h2 style="margin-bottom: 0px;">Mission List</h2>
5
+  <small class="api-endpoint"><span class="label label-success">GET</span> /missions/{{test}}</small>
6
+  <hr>
7
+
8
+  <h5 class="top-spacer">Variables</h5>
9
+
10
+  <table class="table table-bordered top-spacer">
11
+    <tr>
12
+      <th>count</th>
13
+      <td>The number of items in the list</td>
14
+    </tr>
15
+    <tr>
16
+      <th>page</th>
17
+      <td>The page of items to be return. <i>Example: if count is 10 and page is 3, then the items 20-30 will be returned.</i></td>
18
+    </tr>
19
+    <tr>
20
+      <th>status</th>
21
+      <td>Filter for the missions status. Status can be <code>Planning</code>, <code>Launched</code>, <code>Completed</code> or <code>Failed</code>, <code>Canceled</code>.
22
+  </table>
23
+
24
+  <h5>Description</h5>
25
+
26
+  <p class="top-spacer">You can get a list of missions and their details using this endpoint. Its also possible to do pagination and use filters to fine grain the returned results.</p>
27
+
28
+  <h5>Examples</h5>
29
+  <tabset class="top-spacer">
30
+    <tab heading="cURL">
31
+      <div hljs language="bash">curl http://avalanche.network/api/missions/</div>
32
+    </tab>
33
+    <tab heading="jQuery">
34
+      <div hljs language="javascript" include="'views/snipets/jquery/get-missions-example.html'" onload="hljs"></div>
35
+    </tab>
36
+  </tabset>
37
+
38
+  <h5>Responses</h5>
39
+  <tabset class="top-spacer">
40
+    <tab heading="Try It">
41
+      <form class="top-spacer">
42
+        <div class="row">
43
+          <div class="col-sm-8">
44
+            <input type="text" class="form-control" id="exampleInputAmount" placeholder="http://avalanche.network/api/missions" disabled>
45
+          </div>
46
+          <button type="submit" class="btn btn-success" ng-click="call_api('/missions')">Try It</button>
47
+          <button type="submit" class="btn" ng-click="hideResponse()" ng-hide="hideResult">Hide</button>
48
+        </div>
49
+      </form>
50
+      <div class="table-responsive col-sm-12" ng-hide="hideResult">
51
+        <table class="table table-bordered top-spacer" >
52
+          <tr>
53
+            <td colspan="2">{{status(response.status)}}</td>
54
+          </tr>
55
+          <tr>
56
+            <td colspan="2"><json-formatter json="response.data" open="1" style="overflow-x: hidden;"></json-formatter></td>
57
+          </tr>
58
+          <tr>
59
+            <td>Method</td>
60
+            <td>{{response.config.method}}</i></td>
61
+          </tr>
62
+          <tr>
63
+            <td>Request Headers</td>
64
+            <td>{{response.config.headers.Accept}}</td>
65
+          </tr>
66
+          <tr>
67
+            <td>URL</td>
68
+            <td>{{response.config.url}}</td>
69
+          </tr>
70
+          <tr>
71
+            <td>Status</td>
72
+            <td>{{status(response.status)}}</td>
73
+          </tr>
74
+          <tr >
75
+            <td style="min-width: 150px;">Response Headers</td>
76
+            <td>{{stringfy(response.headers())}}</td>
77
+          </tr>
78
+        </table>
79
+      </div>
80
+    </tab>
81
+    <tab heading="Success Example">
82
+      <div hljs language="json" include="'views/snipets/json/get-missions-success-response-example.html'"></div>
83
+    </tab>
84
+    <tab heading="Failure Example">
85
+      <div hljs language="json" include="'views/snipets/json/get-missions-failure-response-example.html'"></div>
86
+    </tab>
87
+  </tabset>
88
+</div>

+ 17 - 0
app/views/getting-started.html

@@ -0,0 +1,17 @@
1
+<div class="container-fluid" >
2
+  <div class="row">
3
+    <div class="col-sm-3 col-md-2 sidebar sidebar-main">
4
+      <h1>docs</h1>
5
+      <ul class="nav nav-sidebar">
6
+        <li class="active"><a ui-sref="getting-started">Getting Started<span class="sr-only">(current)</span></a></li>
7
+        <li><a ui-sref="rulebook.intro">Rulebook</a></li>
8
+        <li><a ui-sref="styleguide">Styleguide</a></li>
9
+        <li><a ui-sref="rest-api-v1.get-missions">Restfull API v1 </a></li>
10
+        <li><a ui-sref="realtime-api-v1">Realtime API v1</a></li>
11
+      </ul>
12
+    </div>
13
+    <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main" ui-view>
14
+
15
+    </div>
16
+  </div>
17
+</div>

+ 23 - 0
app/views/main.html

@@ -0,0 +1,23 @@
1
+<div class="jumbotron">
2
+  <h1>'Allo, 'Allo!</h1>
3
+  <p class="lead">
4
+    <img src="images/yeoman.png" alt="I'm Yeoman"><br>
5
+    Always a pleasure scaffolding your apps.
6
+  </p>
7
+  <p><a class="btn btn-lg btn-success" ng-href="#/">Splendid!<span class="glyphicon glyphicon-ok"></span></a></p>
8
+</div>
9
+
10
+<div class="row marketing">
11
+  <h4>HTML5 Boilerplate</h4>
12
+  <p>
13
+    HTML5 Boilerplate is a professional front-end template for building fast, robust, and adaptable web apps or sites.
14
+  </p>
15
+
16
+  <h4>Angular</h4>
17
+  <p>
18
+    AngularJS is a toolset for building the framework most suited to your application development.
19
+  </p>
20
+
21
+  <h4>Karma</h4>
22
+  <p>Spectacular Test Runner for JavaScript.</p>
23
+</div>

+ 105 - 0
app/views/rest-api-v1.html

@@ -0,0 +1,105 @@
1
+<div class="container-fluid" >
2
+  <div class="row">
3
+    <div class="col-sm-3 col-md-2 sidebar sidebar-main">
4
+      <h1>docs</h1>
5
+      <ul class="nav nav-sidebar">
6
+        <li><a ui-sref="getting-started">Getting Started</a></li>
7
+        <li><a ui-sref="rulebook.intro">Rulebook</a></li>
8
+        <li><a ui-sref="styleguide">Styleguide</a></li>
9
+        <li class="active"><a ui-sref="rest-api-v1.get-missions">Restfull API v1 <span class="sr-only">(current)</span></a></li>
10
+        <li><a ui-sref="realtime-api-v1">Realtime API v1</a></li>
11
+      </ul>
12
+    </div>
13
+    <div class="col-sm-4 col-md-3 col-md-offset-2 col-sm-offset-3 sidebar sidebar-secondary">
14
+      <ul class="nav nav-sidebar">
15
+        <li ng-class="{ active: isActive('/rest-api-v1/get-missions')}">
16
+          <a ui-sref="rest-api-v1.get-missions">
17
+            <small class="api-endpoint"><span class="label label-success">GET</span><samp>/missions/</samp></small>
18
+            <p class="endpoint-description"><i>Mission list</i></p>
19
+          </a>
20
+        </li>
21
+        <li ng-class="{ active: isActive('/rest-api-v1/get-mission')}">
22
+          <a ui-sref="rest-api-v1.get-mission">
23
+            <small class="api-endpoint"><span class="label label-success">GET</span><samp>/missions/:id</samp></small>
24
+            <p class="endpoint-description"><i>View mission details</i></p>
25
+          </a>
26
+        </li>
27
+        <li ng-class="{ active: isActive('/rest-api-v1/post-mission')}">
28
+          <a ui-sref="rest-api-v1.post-mission">
29
+            <small class="api-endpoint"><span class="label label-info">POST</span><samp>/missions/:id</samp></small>
30
+            <p class="endpoint-description"><i>Post or update a mission</i></p>
31
+          </a>
32
+        </li>
33
+        <li ng-class="{ active: isActive('/rest-api-v1/launch-mission')}">
34
+          <a ui-sref="rest-api-v1.launch-mission">
35
+            <small class="api-endpoint"><span class="label label-info">POST</span><samp>/missions/:id/launch</samp></small>
36
+            <p class="endpoint-description"><i>Launch mission</i></p>
37
+          </a>
38
+        </li>
39
+        <li ng-class="{ active: isActive('/rest-api-v1/delete-mission')}">
40
+          <a ui-sref="rest-api-v1.delete-mission">
41
+            <small class="api-endpoint"><span class="label label-danger">DELETE</span><samp>/missions/:id</samp></small>
42
+            <p class="endpoint-description"><i>Remove mission</i></p>
43
+          </a>
44
+        </li>
45
+        <li ng-class="{ active: isActive('/rest-api-v1/get-mission-agents')}">
46
+          <a ui-sref="rest-api-v1.get-mission-agents">
47
+            <small class="api-endpoint"><span class="label label-success">GET</span><samp>/missions/:id/agents</samp></small>
48
+            <p class="endpoint-description"><i>Mission agents list</i></p>
49
+          </a>
50
+        </li>
51
+        <li ng-class="{ active: isActive('/rest-api-v1/get-mission-agent')}">
52
+          <a ui-sref="rest-api-v1.get-mission-agent">
53
+            <small class="api-endpoint"><span class="label label-success">GET</span><samp>/missions/:id/agents/:id</samp></small>
54
+            <p class="endpoint-description"><i>Mission agent details</i></p>
55
+          </a>
56
+        </li>
57
+        <li ng-class="{ active: isActive('/rest-api-v1/post-mission-agent')}">
58
+          <a ui-sref="rest-api-v1.post-mission-agent">
59
+            <small class="api-endpoint"><span class="label label-info">POST</span><samp>/missions/:id/agents/:id</samp></small>
60
+            <p class="endpoint-description"><i>Post or update mission agent</i></p>
61
+          </a>
62
+        </li>
63
+        <li ng-class="{ active: isActive('/rest-api-v1/delete-mission-agent')}">
64
+          <a ui-sref="rest-api-v1.delete-mission-agent">
65
+            <small class="api-endpoint"><span class="label label-danger">DELETE</span><samp>/missions/:id/agents/:id</samp></small>
66
+            <p class="endpoint-description"><i>Remove agent from mission</i></p>
67
+          </a>
68
+        </li>
69
+        <li ng-class="{ active: isActive('/rest-api-v1/get-mission-tasks')}">
70
+          <a ui-sref="rest-api-v1.get-mission-tasks">
71
+            <small class="api-endpoint"><span class="label label-success">GET</span><samp>/missions/:id/tasks</samp></small>
72
+            <p class="endpoint-description"><i>Mission tasks list</i></p>
73
+          </a>
74
+        </li>
75
+        <li ng-class="{ active: isActive('/rest-api-v1/get-mission-task')}">
76
+          <a ui-sref="rest-api-v1.get-mission-task">
77
+            <small class="api-endpoint"><span class="label label-success">GET</span><samp>/missions/:id/task/:id</samp></small>
78
+            <p class="endpoint-description"><i>Mission task details</i></p>
79
+          </a>
80
+        </li>
81
+        <li ng-class="{ active: isActive('/rest-api-v1/mark-mission-task')}">
82
+          <a ui-sref="rest-api-v1.mark-mission-task">
83
+            <small class="api-endpoint"><span class="label label-info">POST</span><samp>/missions/:id/task/:id/mark</samp></small>
84
+            <p class="endpoint-description"><i>Mark mission task</i></p>
85
+          </a>
86
+        </li>
87
+        <li ng-class="{ active: isActive('/rest-api-v1/post-mission-task')}">
88
+          <a ui-sref="rest-api-v1.post-mission-task">
89
+            <small class="api-endpoint"><span class="label label-info">POST</span><samp>/missions/:id/task/:id</samp></small>
90
+            <p class="endpoint-description"><i>Post or update mission task</i></p>
91
+          </a>
92
+        </li>
93
+        <li ng-class="{ active: isActive('/rest-api-v1/delete-mission-task')}">
94
+          <a ui-sref="rest-api-v1.delete-mission-task">
95
+            <small class="api-endpoint"><span class="label label-danger">DELETE</span><samp>/missions/:id/task/:id</samp></small>
96
+            <p class="endpoint-description"><i>Remove mission task</i></p>
97
+          </a>
98
+        </li>
99
+      </ul>
100
+    </div>
101
+    <div class="col-sm-5 col-sm-offset-7 col-md-7 col-md-offset-5 main" ui-view>
102
+
103
+    </div>
104
+  </div>
105
+</div>

+ 39 - 0
app/views/rulebook.html

@@ -0,0 +1,39 @@
1
+<div class="container-fluid" >
2
+  <div class="row">
3
+    <div class="col-sm-3 col-md-2 sidebar sidebar-main">
4
+      <h1>docs</h1>
5
+      <ul class="nav nav-sidebar">
6
+        <li><a ui-sref="getting-started">Getting Started</a></li>
7
+        <li class="active"><a ui-sref="rulebook.intro">Rulebook <span class="sr-only">(current)</span></a></li>
8
+        <li><a ui-sref="styleguide">Styleguide</a></li>
9
+        <li><a ui-sref="rest-api-v1.get-missions">Restfull API v1</a></li>
10
+        <li><a ui-sref="realtime-api-v1">Realtime API v1</a></li>
11
+      </ul>
12
+    </div>
13
+    <div class="col-sm-4 col-md-3 col-md-offset-2 col-sm-offset-3 sidebar sidebar-secondary">
14
+      <ul class="nav nav-sidebar">
15
+        <li ng-class="{ active: isActive('/rulebook/intro')}">
16
+          <a ui-sref="rulebook.intro">
17
+            <h5>Introduction</h5>
18
+            <p class="endpoint-description"><i>What is Avalanche Network?</i></p>
19
+          </a>
20
+        </li>
21
+        <li ng-class="{ active: isActive('/rulebook/mission')}">
22
+          <a ui-sref="rulebook.mission">
23
+            <h5>Mission Basics</h5>
24
+            <p class="endpoint-description"><i>Mechanics of how a mission works</i></p>
25
+          </a>
26
+        </li>
27
+        <li ng-class="{ active: isActive('/rulebook/tasks-validations')}">
28
+          <a ui-sref="rulebook.tasks-validations">
29
+            <h5>Tasks & Validations</h5>
30
+            <p class="endpoint-description"><i>How to automaticaly validate tasks</i></p>
31
+          </a>
32
+        </li>
33
+      </ul>
34
+    </div>
35
+    <div class="col-sm-5 col-sm-offset-7 col-md-7 col-md-offset-5 main" ui-view>
36
+
37
+    </div>
38
+  </div>
39
+</div>

+ 6 - 0
app/views/rulebook/introduction.html

@@ -0,0 +1,6 @@
1
+
2
+
3
+<div class="api-endpoint">
4
+  <h2 style="margin-bottom: 0px;">Introduction</h2>
5
+  <hr>
6
+</div>

+ 6 - 0
app/views/rulebook/mission.html

@@ -0,0 +1,6 @@
1
+
2
+
3
+<div class="api-endpoint">
4
+  <h2 style="margin-bottom: 0px;">Mission</h2>
5
+  <hr>
6
+</div>

+ 3 - 0
app/views/snipets/jquery/get-missions-example.html

@@ -0,0 +1,3 @@
1
+$.get(' http://avalanche.network/api/missions/', function(data) {
2
+  alert(data);
3
+});

+ 4 - 0
app/views/snipets/json/get-missions-failure-response-example.html

@@ -0,0 +1,4 @@
1
+{
2
+  "error": true,
3
+  "message": "No missions found"
4
+}

+ 66 - 0
app/views/snipets/json/get-missions-success-response-example.html

@@ -0,0 +1,66 @@
1
+[
2
+  {
3
+    "id":1,
4
+    "mission_agents_id":null,
5
+    "title":"Test Mission",
6
+    "objective":"Test the Avalanche Network system",
7
+    "briefing":"\u003Ch1\u003E\u003Cspan style=\"color: inherit; font-family: inherit;\"\u003ETesting mission briefing header\u003C/span\u003E\u003Cbr\u003E\u003C/h1\u003E\u003Cdiv\u003E\u003Cbr\u003E\u003C/div\u003EThis is the first test mission. The system has to be tested for all possible scenarios.\u003Cdiv\u003E\u003Cbr\u003E\u003C/div\u003E\u003Cdiv\u003EWill this look super cool?\u003C/div\u003E\u003Cdiv\u003ESome stuff to do:\u003C/div\u003E\u003Cdiv\u003Esdfdsf\u003C/div\u003E\u003Cdiv\u003E\u003Cbr\u003E\u003C/div\u003E\u003Cdiv\u003E\u003Ctable class=\"table table-bordered\" style=\"text-align: right;\"\u003E\u003Ctbody\u003E\u003Ctr\u003E\u003Ctd\u003Esdfsdf\u003C/td\u003E\u003Ctd\u003Esdfsdf\u003C/td\u003E\u003C/tr\u003E\u003Ctr\u003E\u003Ctd\u003Esdfsdf\u003C/td\u003E\u003Ctd\u003Esdfdsf\u003C/td\u003E\u003C/tr\u003E\u003C/tbody\u003E\u003C/table\u003E\u003Cspan style=\"font-size: 24px;\"\u003E\u003Cdiv style=\"text-align: right;\"\u003Esdfdsf\u003C/div\u003E\u003C/span\u003E\u003C/div\u003E\u003Cdiv\u003E\u003Cbr\u003E\u003Col\u003E\u003Cli\u003E\u003Cspan style=\"font-size: 14px; line-height: 26px;\"\u003Edasasdf\u003C/span\u003E\u003Cbr\u003E\u003C/li\u003E\u003C/ol\u003E\u003Cspan style=\"font-size: 14px;\"\u003E\u003Cbr\u003E\u003Cul\u003E\u003Cli\u003E\u003Cspan style=\"line-height: 26px;\"\u003Easdf\u003C/span\u003E\u003Cbr\u003E\u003C/li\u003E\u003Cli\u003E\u003Cspan style=\"line-height: 26px;\"\u003Easdfsdf\u003C/span\u003E\u003Cbr\u003E\u003C/li\u003E\u003C/ul\u003E\u003Cdiv\u003E\u003Cimg src=\"/uploads/file/2/amd-korea-kim-jong-un-jpg.jpeg\" style=\"width: 708px;\"\u003E\u003Cbr\u003E\u003C/div\u003E\u003C/span\u003E\u003C/div\u003E",
8
+    "owner_id":1,
9
+    "status":2,
10
+    "launched":true,
11
+    "language":"en",
12
+    "cover_img":
13
+    {
14
+      "url":"/uploads/cover_img/1/0_78a0f_bf4b86b6_orig.jpg",
15
+      "feature":
16
+      {
17
+        "url":"/uploads/cover_img/1/feature_0_78a0f_bf4b86b6_orig.jpg"
18
+      },
19
+      "thumb":
20
+      {
21
+        "url":"/uploads/cover_img/1/thumb_0_78a0f_bf4b86b6_orig.jpg"
22
+      }
23
+    },
24
+    "created_at":"2015-01-20T22:20:51.622-06:00",
25
+    "updated_at":"2015-04-24T01:24:47.091-05:00",
26
+    "slug":"test-mission",
27
+    "end_date":"2015-09-25T18:17:11.437-05:00",
28
+    "rewards_id":null,
29
+    "duration_scale":"days",
30
+    "duration_number":192,
31
+    "launch_date":"2015-03-17T18:17:11.437-05:00",
32
+    "video":"https://www.youtube.com/watch?v=jijdm7sVphU"
33
+  },
34
+  {
35
+    "id":2,
36
+    "mission_agents_id":null,
37
+    "title":"Avalanche Teste #1",
38
+    "objective":"Vamos testar o sistema do jogo avalanche e ver como ele se comporta alem de descobrir bugs.",
39
+    "briefing":"Teste o sistema!",
40
+    "owner_id":1,
41
+    "status":3,
42
+    "launched":null,
43
+    "language":"",
44
+    "cover_img":
45
+    {
46
+      "url":"/uploads/cover_img/2/tumblr_my2z875cFH1scd4jmo1_1280.jpg",
47
+      "feature":
48
+      {
49
+        "url":"/uploads/cover_img/2/feature_tumblr_my2z875cFH1scd4jmo1_1280.jpg"
50
+      },
51
+      "thumb":
52
+      {
53
+        "url":"/uploads/cover_img/2/thumb_tumblr_my2z875cFH1scd4jmo1_1280.jpg"
54
+      }
55
+    },
56
+    "created_at":"2015-02-08T18:53:15.097-06:00",
57
+    "updated_at":"2015-02-15T18:03:15.964-06:00",
58
+    "slug":"avalanche-teste-1",
59
+    "end_date":null,
60
+    "rewards_id":null,
61
+    "duration_scale":null,
62
+    "duration_number":null,
63
+    "launch_date":null,
64
+    "video":null
65
+  }
66
+]

+ 33 - 0
bower.json

@@ -0,0 +1,33 @@
1
+{
2
+  "name": "avalanche-docs",
3
+  "version": "0.0.0",
4
+  "dependencies": {
5
+    "angular": "^1.3.0",
6
+    "bootstrap": "^4.0.0",
7
+    "angular-animate": "^1.3.0",
8
+    "angular-cookies": "^1.3.0",
9
+    "angular-resource": "^1.3.0",
10
+    "angular-route": "^1.3.0",
11
+    "angular-sanitize": "^1.3.0",
12
+    "angular-touch": "^1.3.0",
13
+    "angular-bootstrap": "~0.13.3",
14
+    "angular-highlightjs": "~0.4.3",
15
+    "json-formatter": "~0.3.1",
16
+    "angular-spinner": "~0.6.2",
17
+    "angular-ui-router": "~0.2.15"
18
+  },
19
+  "devDependencies": {
20
+    "angular-mocks": "^1.3.0"
21
+  },
22
+  "appPath": "app",
23
+  "moduleName": "avalancheDocsApp",
24
+  "overrides": {
25
+    "bootstrap": {
26
+      "main": [
27
+        "less/bootstrap.less",
28
+        "dist/css/bootstrap.css",
29
+        "dist/js/bootstrap.js"
30
+      ]
31
+    }
32
+  }
33
+}

+ 40 - 0
package.json

@@ -0,0 +1,40 @@
1
+{
2
+  "name": "avalanchedocs",
3
+  "private": true,
4
+  "devDependencies": {
5
+    "grunt": "^0.4.5",
6
+    "grunt-angular-templates": "^0.5.7",
7
+    "grunt-autoprefixer": "^2.0.0",
8
+    "grunt-concurrent": "^1.0.0",
9
+    "grunt-contrib-clean": "^0.6.0",
10
+    "grunt-contrib-compass": "^1.0.0",
11
+    "grunt-contrib-concat": "^0.5.0",
12
+    "grunt-contrib-connect": "^0.9.0",
13
+    "grunt-contrib-copy": "^0.7.0",
14
+    "grunt-contrib-cssmin": "^0.12.0",
15
+    "grunt-contrib-htmlmin": "^0.4.0",
16
+    "grunt-contrib-imagemin": "^0.9.2",
17
+    "grunt-contrib-jshint": "^0.11.0",
18
+    "grunt-contrib-uglify": "^0.7.0",
19
+    "grunt-contrib-watch": "^0.6.1",
20
+    "grunt-filerev": "^2.1.2",
21
+    "grunt-google-cdn": "^0.4.3",
22
+    "grunt-karma": "*",
23
+    "grunt-newer": "^1.1.0",
24
+    "grunt-ng-annotate": "^0.9.2",
25
+    "grunt-svgmin": "^2.0.0",
26
+    "grunt-usemin": "^3.0.0",
27
+    "grunt-wiredep": "^2.0.0",
28
+    "jit-grunt": "^0.9.1",
29
+    "jshint-stylish": "^1.0.0",
30
+    "karma-jasmine": "*",
31
+    "karma-phantomjs-launcher": "*",
32
+    "time-grunt": "^1.0.0"
33
+  },
34
+  "engines": {
35
+    "node": ">=0.10.0"
36
+  },
37
+  "scripts": {
38
+    "test": "grunt test"
39
+  }
40
+}

+ 18 - 0
test/.jshintrc

@@ -0,0 +1,18 @@
1
+{
2
+  "bitwise": true,
3
+  "browser": true,
4
+  "curly": true,
5
+  "eqeqeq": true,
6
+  "esnext": true,
7
+  "jasmine": true,
8
+  "latedef": true,
9
+  "noarg": true,
10
+  "node": true,
11
+  "strict": true,
12
+  "undef": true,
13
+  "unused": true,
14
+  "globals": {
15
+    "angular": false,
16
+    "inject": false
17
+  }
18
+}

+ 89 - 0
test/karma.conf.js

@@ -0,0 +1,89 @@
1
+// Karma configuration
2
+// http://karma-runner.github.io/0.12/config/configuration-file.html
3
+// Generated on 2015-08-20 using
4
+// generator-karma 1.0.0
5
+
6
+module.exports = function(config) {
7
+  'use strict';
8
+
9
+  config.set({
10
+    // enable / disable watching file and executing tests whenever any file changes
11
+    autoWatch: true,
12
+
13
+    // base path, that will be used to resolve files and exclude
14
+    basePath: '../',
15
+
16
+    // testing framework to use (jasmine/mocha/qunit/...)
17
+    // as well as any additional frameworks (requirejs/chai/sinon/...)
18
+    frameworks: [
19
+      "jasmine"
20
+    ],
21
+
22
+    // list of files / patterns to load in the browser
23
+    files: [
24
+      // bower:js
25
+      'bower_components/jquery/dist/jquery.js',
26
+      'bower_components/angular/angular.js',
27
+      'bower_components/bootstrap/dist/js/bootstrap.js',
28
+      'bower_components/angular-animate/angular-animate.js',
29
+      'bower_components/angular-cookies/angular-cookies.js',
30
+      'bower_components/angular-resource/angular-resource.js',
31
+      'bower_components/angular-route/angular-route.js',
32
+      'bower_components/angular-sanitize/angular-sanitize.js',
33
+      'bower_components/angular-touch/angular-touch.js',
34
+      'bower_components/angular-bootstrap/ui-bootstrap-tpls.js',
35
+      'bower_components/angular-highlightjs/build/angular-highlightjs.js',
36
+      'bower_components/json-formatter/dist/json-formatter.js',
37
+      'bower_components/spin.js/spin.js',
38
+      'bower_components/angular-spinner/angular-spinner.js',
39
+      'bower_components/angular-ui-router/release/angular-ui-router.js',
40
+      'bower_components/angular-mocks/angular-mocks.js',
41
+      // endbower
42
+      "app/scripts/**/*.js",
43
+      "test/mock/**/*.js",
44
+      "test/spec/**/*.js"
45
+    ],
46
+
47
+    // list of files / patterns to exclude
48
+    exclude: [
49
+    ],
50
+
51
+    // web server port
52
+    port: 8080,
53
+
54
+    // Start these browsers, currently available:
55
+    // - Chrome
56
+    // - ChromeCanary
57
+    // - Firefox
58
+    // - Opera
59
+    // - Safari (only Mac)
60
+    // - PhantomJS
61
+    // - IE (only Windows)
62
+    browsers: [
63
+      "PhantomJS"
64
+    ],
65
+
66
+    // Which plugins to enable
67
+    plugins: [
68
+      "karma-phantomjs-launcher",
69
+      "karma-jasmine"
70
+    ],
71
+
72
+    // Continuous Integration mode
73
+    // if true, it capture browsers, run tests and exit
74
+    singleRun: false,
75
+
76
+    colors: true,
77
+
78
+    // level of logging
79
+    // possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG
80
+    logLevel: config.LOG_INFO,
81
+
82
+    // Uncomment the following lines if you are using grunt's server to run the tests
83
+    // proxies: {
84
+    //   '/': 'http://localhost:9000/'
85
+    // },
86
+    // URL root prevent conflicts with the site root
87
+    // urlRoot: '_karma_'
88
+  });
89
+};

+ 23 - 0
test/spec/controllers/about.js

@@ -0,0 +1,23 @@
1
+'use strict';
2
+
3
+describe('Controller: AboutCtrl', function () {
4
+
5
+  // load the controller's module
6
+  beforeEach(module('avalancheDocsApp'));
7
+
8
+  var AboutCtrl,
9
+    scope;
10
+
11
+  // Initialize the controller and a mock scope
12
+  beforeEach(inject(function ($controller, $rootScope) {
13
+    scope = $rootScope.$new();
14
+    AboutCtrl = $controller('AboutCtrl', {
15
+      $scope: scope
16
+      // place here mocked dependencies
17
+    });
18
+  }));
19
+
20
+  it('should attach a list of awesomeThings to the scope', function () {
21
+    expect(AboutCtrl.awesomeThings.length).toBe(3);
22
+  });
23
+});

+ 23 - 0
test/spec/controllers/main.js

@@ -0,0 +1,23 @@
1
+'use strict';
2
+
3
+describe('Controller: MainCtrl', function () {
4
+
5
+  // load the controller's module
6
+  beforeEach(module('avalancheDocsApp'));
7
+
8
+  var MainCtrl,
9
+    scope;
10
+
11
+  // Initialize the controller and a mock scope
12
+  beforeEach(inject(function ($controller, $rootScope) {
13
+    scope = $rootScope.$new();
14
+    MainCtrl = $controller('MainCtrl', {
15
+      $scope: scope
16
+      // place here mocked dependencies
17
+    });
18
+  }));
19
+
20
+  it('should attach a list of awesomeThings to the scope', function () {
21
+    expect(MainCtrl.awesomeThings.length).toBe(3);
22
+  });
23
+});